Dual booting arch and win11
Prerequisites
Before installing arch we need to do the following things
Disk partition
We’ll need to make a disk partition in windows 11 before proceeding to make sure both the OS run isolated, this can be done by the following steps
- Right-click on the Start menu and select Disk Management. Alternatively, you can press
Win + X
and choose Disk Management from the list. - In the Disk Management window, locate the drive you want to partition (usually the C: drive). In my case I’ve installed in D drive on a separate disk
- Right-click on the drive and select Shrink Volume
- In the dialog that appears, enter the amount of space to shrink (in MB). This will be the size of the new partition for Arch Linux. Make sure to leave enough space for Windows. In my case I’ve allocated 100 gigs for Arch.
- Click Shrink. The unallocated space will appear in the Disk Management window.
Bios settings
- Disable Fast Startup
- Disable secure boot
Arch ISO setup
- Download arch ISO from the official site.
- Install a tool such as Rufus or Etcher and burn the ISO onto a USB drive.
Booting onto Arch
- Insert the drive into the computer
- Restart the computer into the BIOS/UEFI/Bootloader menu
- Select the boot option as the USB drive
Installing Arch
(under progress)
Crutial services
IWCTL - wifi configuration
To check whether you are connected to internet one of two commands can be used
ip a
: Can be used for showing all the ip information that are ongoing, shows the ip address of all the networking devices, these include, looplack device, wifi adaptor and ethernet (if you have one)ping (domain name)
: Can be used to hit a ping or do a packet transfer towards a domain on the net. Usage:ping www.exampleanydomainname.com
.
The IWCTL CLI can be used via
1. IWCTL can be installed via the following command.
bash sudo pacman -S iwd
2. We can iuse the iwctl cli app by just typing in iwctl
3. When inside iwctl the following command can be used to list the devices inside the computer, this can be done via
bash device list
4. To scan for the available netowrks
bash station <device_name> scan
5. To list hte available networks
bash station <device_name> get-networks
6. Connect to a Wi-Fi network
bash station <device_name> connect <SSID>
7. Get details of the connection
bash station <device_name> show
8. Can be exited via
bash exit
Sometimes IWCTL may not work because of DHCP issue, this can be resolved via
- Check installation of
dhcpcd
1
dhcpcd --help
- If not already installed install it via
1
sudo pacman -S dhcpcd
- Start the service
1
sudo systemctl enable dhclient --now
Apps and user config
Pacman
Lets first see the base docs of pacman
The pacman
command is a package manager used in Arch Linux and its derivatives to manage software packages. Here’s a basic guide on how to use it:
Update Package Database:
1
sudo pacman -Sy
Updates the package database to the latest version.
Upgrade All Packages:
1
sudo pacman -Su
Upgrades all installed packages to their latest versions.
Install a Package:
1
sudo pacman -S package_name
Replace
package_name
with the name of the package you want to install.Remove a Package:
1
sudo pacman -R package_name
This removes the specified package.
Remove a Package and Its Dependencies:
1
sudo pacman -Rns package_name
This removes the package along with its unused dependencies.
Search for a Package:
1
pacman -Ss search_term
This searches the package database for the specified term.
Show Package Information:
1
pacman -Si package_name
Displays detailed information about a specified package.
List Installed Packages:
1
pacman -Q
Check for Package Updates:
1
pacman -Qu
Lists all packages that have updates available.
Additional options
- Verbose Mode: Add
v
for verbose output. - Help: Use
pacman -h
to see all available options.
My installed pacman packages
Zsh - Ref
Setup and install
My configuration - extensions Ref
Extensions list
- Zsh autosuggest
- Zsh syntax highlight
- You should use
- Zsh-bat
1 2 3 4 5
# cloning all the repos git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting git clone https://github.com/MichaelAquilina/zsh-you-should-use.git $ZSH_CUSTOM/plugins/you-should-use git clone https://github.com/fdellwing/zsh-bat.git $ZSH_CUSTOM/plugins/zsh-bat
Now go to the line that says
plugins=(git)
and replace them with the following1
plugins=(git zsh-autosuggestions zsh-syntax-highlighting you-should-use zsh-bat)
A note that bat needs a package dependency also, this may be done via running the following command
1
sudo pacman -S bat
Now refresh the shell by using
1
source ~/.zshrc
Configuring the theme
For this install we are going to use powerlevel10k, via this command
1
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
then we are going to configure the
~/.zshrc
file to reflect the theme, this can be done via opening the~/.zshrc
file and paste the followingpaste the following in place of
ZSH_THEME="robbyrussell
1
ZSH_THEME="powerlevel10k/powerlevel10k"
NodeJS: For installing the 20x version we are using the following command
1
sudo pacman -S nodejs npm
Pip: A package manager for python
1
sudo pacman -S python-pip
Hugo: A static site builder
1
sudo pacman -S hugo
LibreOffice: Documentation and productivity suite
1
sudo pacman -S libreoffice-fresh # or libreoffice-still for stable version
Neovim: CLI based text editor
1
sudo pacman -S neovim
Optional: I’ve set up neovim kickstart to quick start neovim.
AUR
Setting up
yay
and basics of AURFor the initial setup of the AUR first you need to update all the packages inside it this can be done via. Then install the packages. This can be checked below. Ref.
Firstly we need to install
yay
which is a helper for installing software via AUR this can be done by the following commandsif the program doesn’t compile then you may need to install the following dependencies (optional)
now we can install yay via
pacman
1
sudo pacman -U yay-12.4.2-1-x86_64.pkg.tar.zst
the install can be checked and verified via
1
yay -h
My AUR packages
Note: Packages installed via
yay
may not needsudo
privalages
Additional settings
Battery threshold
In a laptop where the laptop is always plugged in it is important to set up a battery threshold to preserve the battery life. In KDE Plasma 6 this feature is already baked in, however in Plasma 6.2.1 (the one which I’m using the time of writing) resets the threshold value on every boot, this can be fixed in the following way. Ref.
To achieve this i did the following steps
Create a service - I named it
kde-battery-threshold-workaround.service
, this can be located in/etc/systemd/system
Paste the following in it
1 2 3 4 5 6 7 8 9 10 11
[Unit] Description=Set Battery Charge Control Threshold [Service] ExecStart=/usr/bin/sudo /bin/sh -c 'echo "60" > /sys/class/power_supply/BAT1/charge_control_end_threshold' # you can change this line accordingly to your battery dir Type=oneshot RemainAfterExit=yes ExecStartPre=/bin/sleep 10 [Install] WantedBy=multi-user.target
Run the following commands
Git setup