From 7939805687e75f8a46cd6c43a80e9fb3db88da81 Mon Sep 17 00:00:00 2001
From: "David T. Sadler" So I purchased a used Thinkpad X220 for about £90 on eBay and decided to install Arch Linux onto it. This guide is the steps that I took to achieve this. Now when it comes to Linux there is always more than one way of doing things and this guide is just my preferred way. Feel free to follow it for your own installation, just keep in mind that you may have to change some of the steps to suit your own circumstances. Also there is every chance that the information presented here will be out of date so I recommend that you at least read the through the official installation guide for the most up-to-date information. The Arch Linux download page provides direct download and torrent links. You should also download the PGP signature to the same location and use the gpg command to verify that the ISO has not been compromised. Flash the image to a USB drive using Etcher. Alternatively you can use the dd command. Just ensure that /path/to/archlinux.iso is to where you have downloaded the image and that /dev/sdx is your USB drive. I wanted to make sure that the Thinkpad was using UEFI as I would be using EFISTUB to load the Linux kernel as an EFI executable. This is done through the BIOS which can be gotten to by pressing the ThinkVantage button as the machine is booting before pressing F1 to get to the BIOS settings. From there navigate to Startup and changed the UEFI/Legacy Boot option to be UEFI Only. Press F10 to save and exit the BIOS and then power down the machine. With the USB drive plugged in power the machine back on, all the while pressing F12 until the boot menu appears and select USB HDD: Mass Storage Device and wait for the installation image to boot. When prompted select Arch Linux archiso X86_64 UEFI CD where you will be take to the live environment's terminal. The default console map is US which meant that for me pressing Shift+3 was displaying the hash symbol (#) instead of the pound symbol (£). So the UK keyboard layout needed to be loaded. You can get a list of supported keyboard layouts if you need to load a different one. To verify that the Thinkpad has UEFI enabled check that the efivars directory exists. Verify that the machine can connect to the internet with the ping command. Before booting the machine I plugged in an Ethernet cable that was connected directly to my home network's router. The installation environment detected the network connection and obtained an IP address via DHCP. Ensure the system clock is correct. Use the lsblk command to determine which disks and partitions exist on the system. So I purchased a used Thinkpad X220 for about £90 on eBay and decided to install Arch Linux onto it. This guide is the steps that I took to achieve this. Now when it comes to Linux there is always more than one way of doing things and this guide is just my preferred way. Feel free to follow it for your own installation, just keep in mind that you may have to change some of the steps to suit your own circumstances. Also there is every chance that the information presented here will be out of date so I recommend that you at least read the through the official installation guide for the most up-to-date information. The Arch Linux download page provides direct download and torrent links. You should also download the PGP signature to the same location and use the gpg command to verify that the ISO has not been compromised. Flash the image to a USB drive using Etcher. Alternatively you can use the dd command. Just ensure that /path/to/archlinux.iso is to where you have downloaded the image and that /dev/sdx is your USB drive. I wanted to make sure that the Thinkpad was using UEFI as I would be using EFISTUB to load the Linux kernel as an EFI executable. This is done through the BIOS which can be gotten to by pressing the ThinkVantage button as the machine is booting before pressing F1 to get to the BIOS settings. From there navigate to Startup and changed the UEFI/Legacy Boot option to be UEFI Only. Press F10 to save and exit the BIOS and then power down the machine. With the USB drive plugged in power the machine back on, all the while pressing F12 until the boot menu appears and select USB HDD: Mass Storage Device and wait for the installation image to boot. When prompted select Arch Linux archiso X86_64 UEFI CD where you will be take to the live environment's terminal. The default console map is US which meant that for me pressing Shift+3 was displaying the hash symbol (#) instead of the pound symbol (£). So the UK keyboard layout needed to be loaded. You can get a list of supported keyboard layouts if you need to load a different one. To verify that the Thinkpad has UEFI enabled check that the efivars directory exists. Verify that the machine can connect to the internet with the ping command. Before booting the machine I plugged in an Ethernet cable that was connected directly to my home network's router. The installation environment detected the network connection and obtained an IP address via DHCP. Ensure the system clock is correct. Use the lsblk command to determine which disks and partitions exist on the system. Enter t to change the partition type and enter 1 to make it an EFI System. You can also get a list of partition types by pressing L. Enter t to change the partition type and enter 1 to make it an EFI System. You can also get a list of partition types by pressing L. To create the second partition enter n again to add another partition, and then enter 2 to assign it as the second partition. Use the default values for both first and last sectors to allocate the remainder of the drive. To create the second partition enter n again to add another partition, and then enter 2 to assign it as the second partition. Use the default values for both first and last sectors to allocate the remainder of the drive. Enter w to write the changes and quit. Enter w to write the changes and quit. Use lsblk to confirm that two partitions have been created. Enter and verify a passphrase. Whenever the machine is now booted you will be prompted to enter this passphrase in order for the partition to be decrypted. Enter and verify a passphrase. Whenever the machine is now booted you will be prompted to enter this passphrase in order for the partition to be decrypted. Before setting up LVM decrypt the partition. You will be prompted to enter the passphrase that you set up earlier. Create a physical volume. Create a volume group called vg0. Create three logical volumes for the root, swap and home partitions. Initialise the swap partition. Mount the root partition into /mnt. Mount the boot partition into /mnt/boot. Finally mount the home partition into /mnt/home. All mirror servers defined in /etc/pacman.d/mirrorlist where done at the time the installation image was built. Since it's ideal to try and use servers that are close to your location you can rebuild the list using the rankmirrors utility. This is not included by default on the live environment so you will need to download it. First sync the pacman repository. Then download the pacmain-contrib package which contains the rankmirrors utility. The official Pacman Mirrorlist Generator can be used to get an up-to-date list of servers for your country. The below command obtains a list of UK servers that support https and pass it to rankmirrors to obtain the 5 fastest. The pacstrap script is used to install the base package, Linux kernel and firmware. I also installed a few other packages that I knew I was going to need. Create a fstab file on the new system. Use arch-chroot to enter the new system as the root user. From now on you will be configuring the new system. Setup the timezone. Replace Europe/London with your timezone. Update the hardware clock. Use nvim to edit /etc/locale.gen. Uncomment your preferred language. For me this meant en_GB.UTF-8 UTF-8. Save the file and exit before generating the locales. Edit /etc/locale.conf. Add the below line. Replace en_GB.UTF-8 with the language that you chose earlier. If you used loadkeys earlier you will need to edit /etc/vconsole.conf and add your chosen keymap. For me this meant adding the UK keymap. Create the file /etc/hostname and add an entry to it. This hostname will be the name of the machine on your network. I tend to name by devices after characters from the book Howl's Moving Castle https://en.wikipedia.org/wiki/Howl%27s_Moving_Castle). You then need to edit the /etc/hosts file. Add the following lines to this file. Replace suliman with the hostname you set up earlier. All mirror servers defined in /etc/pacman.d/mirrorlist where done at the time the installation image was built. Since it's ideal to try and use servers that are close to your location you can rebuild the list using the rankmirrors utility. This is not included by default on the live environment so you will need to download it. First sync the pacman repository. Then download the pacmain-contrib package which contains the rankmirrors utility. The official Pacman Mirrorlist Generator can be used to get an up-to-date list of servers for your country. The below command obtains a list of UK servers that support https and pass it to rankmirrors to obtain the 5 fastest. The pacstrap script is used to install the base package, Linux kernel and firmware. I also installed a few other packages that I knew I was going to need. Create a fstab file on the new system. Use arch-chroot to enter the new system as the root user. From now on you will be configuring the new system. Setup the timezone. Replace Europe/London with your timezone. Update the hardware clock. Use nvim to edit /etc/locale.gen. Uncomment your preferred language. For me this meant en_GB.UTF-8 UTF-8. Save the file and exit before generating the locales. Edit /etc/locale.conf. Add the below line. Replace en_GB.UTF-8 with the language that you chose earlier. If you used loadkeys earlier you will need to edit /etc/vconsole.conf and add your chosen keymap. For me this meant adding the UK keymap. Create the file /etc/hostname and add an entry to it. This hostname will be the name of the machine on your network. I tend to name by devices after characters from the book Howl's Moving Castle https://en.wikipedia.org/wiki/Howl%27s_Moving_Castle). You then need to edit the /etc/hosts file. Add the following lines to this file. Replace suliman with the hostname you set up earlier. Use the ip command to determine the name of the wireless network interface. The --unicode argument is where the kernel parameters are specified. This tells the system that the partition identified by PARTUUID is encrypted and that the root filesystem to mount is the logical volume called root that is part of the volume group vg0. The microcode is also loaded with initrd=\intel-ucode.img. Make this script executable. Run the script to add to the motherboard boot entries. Create a secure password for the root user. Return to the Arch live installation environment. Unmount the partitions. Restart the machine with reboot. Remember to remove any installation media such as a USB drive. Provided nothing has gone wrong your machine will boot into a fresh installation of Arch Linux. Don't forget that during the boot you will be prompted to enter the passphrase to decrypt the system partition. Following this guide will leave you with a very minimal system where you can login as the root user. From this point how you configure the system is up to you as it will be very different to how I configure my own. If you interested in seeing how I do it then see my other posts on the subject. I don't have comments as I don't want to manage them. You can however contact me at the below address if you want to. Copyright © 2021 David T. Sadler. The --unicode argument is where the kernel parameters are specified. This tells the system that the partition identified by PARTUUID is encrypted and that the root filesystem to mount is the logical volume called root that is part of the volume group vg0. The microcode is also loaded with initrd=\intel-ucode.img. Make this script executable. Run the script to add to the motherboard boot entries. Create a secure password for the root user. Return to the Arch live installation environment. Unmount the partitions. Restart the machine with reboot. Remember to remove any installation media such as a USB drive. Provided nothing has gone wrong your machine will boot into a fresh installation of Arch Linux. Don't forget that during the boot you will be prompted to enter the passphrase to decrypt the system partition. Following this guide will leave you with a very minimal system where you can login as the root user. From this point how you configure the system is up to you as it will be very different to how I configure my own. If you interested in seeing how I do it then see my other posts on the subject. I don't have comments as I don't want to manage them. You can however contact me at the below address if you want to. Copyright © 2021 David T. Sadler. Now all I have to do is logout of the root account. Then login with the new credentials to confirm that everything is okay. I don't have comments as I don't want to manage them. You can however contact me at the below address if you want to. Copyright © 2021 David T. Sadler. I don't have comments as I don't want to manage them. You can however contact me at the below address if you want to. Copyright © 2021 David T. Sadler.Installing Arch Linux on a Thinkpad X220
Mon 25th May 2020 By David T. Sadler.
Introduction
Download the Arch Linux ISO Image
$ gpg --keyserver-options auto-key-retrieve --verify archlinux-2020.05.01-x86_64.iso.sigCreate a Live USB of Arch Linux
dd bs=4M if=/path/to/archlinux.iso of=/dev/sdx status=progress && syncBoot the Live Environment
Set the Keyboard Layout
$ loadkeys ukls /usr/share/kbd/keymaps/**/*.map.gzVerify the Boot Mode
$ ls /sys/firmware/efi/efivarsConnect to the Internet
$ ping -c3 davidtsadler.comUpdate the System Clock
$ timedatectl set-ntp truePartition the Disks
$ lsblk
+ Installing Arch Linux on a Thinkpad X220
Mon 25th May 2020 By David T. Sadler.
Introduction
Download the Arch Linux ISO Image
$ gpg --keyserver-options auto-key-retrieve --verify archlinux-2020.05.01-x86_64.iso.sigCreate a Live USB of Arch Linux
dd bs=4M if=/path/to/archlinux.iso of=/dev/sdx status=progress && syncBoot the Live Environment
Set the Keyboard Layout
$ loadkeys ukls /usr/share/kbd/keymaps/**/*.map.gzVerify the Boot Mode
$ ls /sys/firmware/efi/efivarsConnect to the Internet
$ ping -c3 davidtsadler.comUpdate the System Clock
$ timedatectl set-ntp truePartition the Disks
$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
loop0 7:0 0 535M 1 loop /run/archiso/sfs/airootfs
@@ -43,15 +43,15 @@ Partition number (1-128, default 1): 1
First sector (2048-625142414, default 2048):
Last sector, +/-sectors or +/-size{K,M,G,T,P} (2048-625142414, default 625142414): +512M
-Created a new partition 1 of type 'Linux filesystem' and of size 512 MiB.Command (m for help): t
+Created a new partition 1 of type 'Linux filesystem' and of size 512 MiB.Command (m for help): t
Selected partition 1
Partition type (type L to list all types): 1
-Changed type of partition 'Linux filesystem' to 'EFI System'.Command (m for help): n
+Changed type of partition 'Linux filesystem' to 'EFI System'.Command (m for help): n
Partition number (2-128, default 2): 2
First sector (1050624-625142414, default 1050624):
Last sector, +/-sectors or +/-size{K,M,G,T,P} (1050624-625142414, default 625142414):
-Created a new partition 2 of type 'Linux filesystem' and of size 297.6 GiB.Command (m for help): w
+Created a new partition 2 of type 'Linux filesystem' and of size 297.6 GiB.Command (m for help): w
The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.$ lsblk /dev/sda
@@ -63,7 +63,7 @@ sda 8:0 0 298.1G 0 disk
========
This will overwrite data on /dev/sda2 irrevocably.
-Are you sure? (Type 'yes' in capital letters): YESEnter passphrase for /dev/sda2:
+Are you sure? (Type 'yes' in capital letters): YESEnter passphrase for /dev/sda2:
Verify passphrase:
cryptsetup luksFormat /dev/sda2 17.01s user 1.05s system 105% cpu 17.106 totalLVM on LUKS
$ cryptsetup open /dev/sda2 cryptlvmEnter passphrase for /dev/sda2:
cryptsetup open /dev/sda2 cryptlvm 6.48s user 0.36s system 92% cpu 7.436 total$ pvcreate /dev/mapper/cryptlvm$ vgcreate vg0 /dev/mapper/cryptlvm$ lvcreate -L 50G vg0 -n root
@@ -81,7 +81,7 @@ sda 8:0 0 298.1G 0 disk
$ mkfs.ext4 /dev/vg0/home$ mkswap /dev/vg0/swap
$ swapon /dev/vg0/swapMount the File Systems
$ mount /dev/vg0/root /mnt$ mkdir /mnt/boot
$ mount /dev/sda1 /mnt/boot$ mkdir /mnt/home
-$ mount /dev/vg0/home /mnt/homeSelect the Mirrors
pacman -Syy$ pacman -S pacman-contrib$ curl -s "https://www.archlinux.org/mirrorlist/?country=GB&protocol=https&use_mirror_status=on" | sed -e 's/^#Server/Server/' -e '/^#/d' | rankmirrors -n 5 - > /etc/pacman.d/mirrorlistInstall Essential Packages
$ pacstrap /mnt base linux linux-firmware neovim wpa_supplicant dhcpcd cryptsetup lvm2 efibootmgr intel-ucodeFstab
$ genfstab -U /mnt >> /mnt/etc/fstabChroot
$ arch-chroot /mntTime Zone
$ ln -sf /usr/share/zoneinfo/Europe/London /etc/localtime$ hwclock --systohcLocalization
$ nvim /etc/locale.gen$ locale-gen$ nvim /etc/locale.confLANG=en_GB.UTF-8
$ nvim /etc/vconsole.confKEYMAP=uk
Network Configuration
$ echo suliman > /etc/hostname$ nvim /etc/hosts127.0.0.1 localhost
+$ mount /dev/vg0/home /mnt/homeSelect the Mirrors
pacman -Syy$ pacman -S pacman-contrib$ curl -s "https://www.archlinux.org/mirrorlist/?country=GB&protocol=https&use_mirror_status=on" | sed -e 's/^#Server/Server/' -e '/^#/d' | rankmirrors -n 5 - > /etc/pacman.d/mirrorlistInstall Essential Packages
$ pacstrap /mnt base linux linux-firmware neovim wpa_supplicant dhcpcd cryptsetup lvm2 efibootmgr intel-ucodeFstab
$ genfstab -U /mnt >> /mnt/etc/fstabChroot
$ arch-chroot /mntTime Zone
$ ln -sf /usr/share/zoneinfo/Europe/London /etc/localtime$ hwclock --systohcLocalization
$ nvim /etc/locale.gen$ locale-gen$ nvim /etc/locale.confLANG=en_GB.UTF-8
$ nvim /etc/vconsole.confKEYMAP=uk
Network Configuration
$ echo suliman > /etc/hostname$ nvim /etc/hosts127.0.0.1 localhost
::1 localhost
127.0.0.1 suliman.localdomain sulimanWireless
$ip link
@@ -98,7 +98,7 @@ Load module index
Parsed configuration file /usr/lib/systemd/network/99-default.link
Parsed configuration file /usr/lib/systemd/network/80-iwd.link
Created link configuration context.
-Using default interface naming scheme 'v245'.
+Using default interface naming scheme 'v245'.
ID_NET_NAMING_SCHEME=v245
ID_NET_NAME_MAC=wlx0811960210ac
ID_OUI_FROM_DATABASE=Intel Corporate
@@ -113,8 +113,8 @@ efibootmgr \
--disk /dev/sda --part 1 \
--create --label "Arch Linux" \
--loader /vmlinuz-linux \
- --unicode 'cryptdevice=PARTUUID='$PARTUUID':cryptlvm root=/dev/vg0/root rw initrd=\intel-ucode.img initrd=\initramfs-linux.img' \
- --verbose chmod u+x /usr/local/sbin/mkefibootentry$ mkefibootentryRoot Password
$ passwdReboot
$ exit$ umount -R /mnt$ rebootLinks
Offical Arch Installation Guide.Arch Linux Download Page.Etcher.Pacman Mirrorlist Generator.Wikipedia Entry for Howl's Moving Castle.Arch - Read More Posts.License
The contents of this site is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.chmod u+x /usr/local/sbin/mkefibootentry$ mkefibootentryRoot Password
$ passwdReboot
$ exit$ umount -R /mnt$ rebootLinks
Offical Arch Installation Guide.Arch Linux Download Page.Etcher.Pacman Mirrorlist Generator.Wikipedia Entry for Howl's Moving Castle.Arch - Read More Posts.License
The contents of this site is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.$ logoutsuliman login: david
Password:
-david@suliman:$Links
Installing Arch Linux on a Thinkpad X220.Arch - Read More Posts.License
The contents of this site is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.Links
Installing Arch Linux on a Thinkpad X220.Arch - Read More Posts.License
The contents of this site is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
Mon 22nd 2020 By David T. Sadler.
So by the end of my last post my minimal installation of Arch Linux had a user account that I could log into instead of the root user. However in order to do anything useful on the system I need to be able to run commands such as pacman that only the root user can do. Now one way to solve this is to change to the root user with su before running the command, but this defeats the point in creating a non-root user account in the first place. Instead a better way is to make use of sudo.
Sudo (su "do") gives the ability for a user (or groups of users) to run some (or all) commands as root and also provides an audit trail of the commands and their arguments. Usage is very simple, you enter sudo followed by the command that you want to run. For example,
$ sudo pacman -SyuConfiguration is done in the file /etc/sudoers. This is where you can specify which users or groups can use sudo and what commands they can run. However, you must be careful when editing this file as any syntax errors will make sudo unusable. Therefore it is strongly recommended to do any editing via the visudo command. This locks the sudoers file, saves edits to a temporary file, and checks that file's grammar before copying it to /etc/sudoers.
Traditionally in Linux systems users that should have privileged administrator rights are added to the wheel group which is then given sudo access. As the root user the first thing that I needed to do was add my user account to the wheel group with the usermod command.
$ usermod -aG wheel davidI used the below options with the command.
The sudo package then needed to be installed.
$ pacman -S sudoNext I needed to grant sudo access to the wheel group by editing /etc/sudoers with visudo. Note that the default editor for visudo is vi. Since this has not been installed on my system I can change the editor to be nvim by first setting the variable EDITOR.
$ EDITOR=nvim visudoOnce the file was opened I located and uncommented the below line before saving and exiting nvim. This allows members of the wheel group to execute any command without having to enter their password.
%wheel ALL(ALL) NOPASSWD: ALLI checked that I had sudo access by running the below command while logged into my user account.
$ sudo pwd
+ Granting Sudo Access to a User in Arch Linux
Mon 22nd 2020 By David T. Sadler.
So by the end of my last post my minimal installation of Arch Linux had a user account that I could log into instead of the root user. However in order to do anything useful on the system I need to be able to run commands such as pacman that only the root user can do. Now one way to solve this is to change to the root user with su before running the command, but this defeats the point in creating a non-root user account in the first place. Instead a better way is to make use of sudo.
Sudo (su "do") gives the ability for a user (or groups of users) to run some (or all) commands as root and also provides an audit trail of the commands and their arguments. Usage is very simple, you enter sudo followed by the command that you want to run. For example,
$ sudo pacman -Syu
Configuration is done in the file /etc/sudoers. This is where you can specify which users or groups can use sudo and what commands they can run. However, you must be careful when editing this file as any syntax errors will make sudo unusable. Therefore it is strongly recommended to do any editing via the visudo command. This locks the sudoers file, saves edits to a temporary file, and checks that file's grammar before copying it to /etc/sudoers.
Traditionally in Linux systems users that should have privileged administrator rights are added to the wheel group which is then given sudo access. As the root user the first thing that I needed to do was add my user account to the wheel group with the usermod command.
$ usermod -aG wheel david
I used the below options with the command.
- -a Modifies the -G argument so that the user is added to the specified groups and not removed from any existing ones.
- -G The list of supplementary groups that the user will be made a member of. In this case it's just wheel. Note that you need to pass -a otherwise the user will be removed from any group that is not listed.
The sudo package then needed to be installed.
$ pacman -S sudo
Next I needed to grant sudo access to the wheel group by editing /etc/sudoers with visudo. Note that the default editor for visudo is vi. Since this has not been installed on my system I can change the editor to be nvim by first setting the variable EDITOR.
$ EDITOR=nvim visudo
Once the file was opened I located and uncommented the below line before saving and exiting nvim. This allows members of the wheel group to execute any command without having to enter their password.
%wheel ALL(ALL) NOPASSWD: ALL
I checked that I had sudo access by running the below command while logged into my user account.
$ sudo pwd
-/home/david
Since I wasn't prompted for my password and the command was executed I knew that I now had sudo access.
Links
Adding a User in Arch Linux.Arch - Read More Posts.I don't have comments as I don't want to manage them. You can however contact me at the below address if you want to.
Email david@davidtsadler.comLicense
The contents of this site is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.Copyright © 2021 David T. Sadler.
Return to Homepage.
+/home/davidSince I wasn't prompted for my password and the command was executed I knew that I now had sudo access.
I don't have comments as I don't want to manage them. You can however contact me at the below address if you want to.
Email david@davidtsadler.comCopyright © 2021 David T. Sadler.
Return to Homepage.Mon 17th August 2020 By David T. Sadler.
Continuing my Arch Linux installation I now have a user account for daily use. However this only provides me with a terminal. What I would like is a traditional multi-window desktop environment which will require me to install two things. A window system of some sort and a layout manager. For this installation I'm going with Xorg and dwm. For those that are not aware dwm is dynamic window manager for Xorg that has been developed by Suckless. Since by default dwm expects st to be installed as the system's terminal and also makes use dmenu to allow you to launch applications I will installed both of them in addition to dwm.
Firt off I need to install the dependencies required by st, dmenu and dwm. Since this is Arch Linux I use pacman to do this.
$ sudo pacman -S base-devel git libx11 libxft xorg-server xorg-xinit terminus-fontThe source code for the software is avialable from the Suckless git repositories so I simply clone them.
$ mkdir -p ~/.local/src
+ Installing ST, DMENU and DWM in Arch Linux
Mon 17th August 2020 By David T. Sadler.
Continuing my Arch Linux installation I now have a user account for daily use. However this only provides me with a terminal. What I would like is a traditional multi-window desktop environment which will require me to install two things. A window system of some sort and a layout manager. For this installation I'm going with Xorg and dwm. For those that are not aware dwm is dynamic window manager for Xorg that has been developed by Suckless. Since by default dwm expects st to be installed as the system's terminal and also makes use dmenu to allow you to launch applications I will installed both of them in addition to dwm.
Install Dependencies
Firt off I need to install the dependencies required by st, dmenu and dwm. Since this is Arch Linux I use pacman to do this.
$ sudo pacman -S base-devel git libx11 libxft xorg-server xorg-xinit terminus-font
- base-devel Since I will be installing from source this package contains various tools to compile software.
- git Is needed to get the source code from the suckless git repositories.
- libx11 and libxft Dependanices required by dwm oherwise it will fail when trying to compile it.
- xorg-server Is the display server that provides the windows that dwm will manage.
- xorg-xinit Allows us to start the display server.
- terminus-font Dwm is configured to use a monospaced font and since I installed a barebones system I need to install such a font now.
Download Git Repositories
The source code for the software is avialable from the Suckless git repositories so I simply clone them.
$ mkdir -p ~/.local/src
$ git clone git://git.suckless.org/st ~/.local/src/st
$ git clone git://git.suckless.org/dmenu ~/.local/src/dmenu
@@ -27,7 +27,7 @@ $ sudo make install
Configure and Install DMENU
Again mov
# XINERAMAFLAGS = -DXINERAMA
Again compiling and installing is done with the below commands.
$ make clean
$ sudo make installFor the final time move to the directory created earlier.
$ cd ~/.local/src/dwmAs with dmenu the same edit needs to be made to the file config.mk.
$ nvim config.mk# XINERAMALIBS = -lXinerama
# XINERAMAFLAGS = -DXINERAMACompile and install as usual.
$ make clean
-$ sudo make installSince I have installed xorg-xinit I need to create a .xinitrc in my home folder.
$ nvim ~/.xinitrcThe contents of this file is just.
exec dwmI can now start xorg and dwm with the below command.
$ startxI don't have comments as I don't want to manage them. You can however contact me at the below address if you want to.
Email david@davidtsadler.comCopyright © 2021 David T. Sadler.
Return to Homepage.Since I have installed xorg-xinit I need to create a .xinitrc in my home folder.
$ nvim ~/.xinitrcThe contents of this file is just.
exec dwmI can now start xorg and dwm with the below command.
$ startxI don't have comments as I don't want to manage them. You can however contact me at the below address if you want to.
Email david@davidtsadler.comCopyright © 2021 David T. Sadler.
Return to Homepage. -Mon 24th August 2020 By David T. Sadler.
As a regular Ubuntu user I am used to using apt for system maintenance. But now that I've installed Arch Linux I will be using pacman and so below is a cheat sheet for myself that shows the pacman equivalent of some common apt actions.
Action | Apt | Pacman | +Pacman Cheat Sheet For Ubuntu Users
Mon 24th August 2020 By David T. Sadler.As a regular Ubuntu user I am used to using apt for system maintenance. But now that I've installed Arch Linux I will be using pacman and so below is a cheat sheet for myself that shows the pacman equivalent of some common apt actions.
Action | Apt | Pacman | ---------------------------|--------------------------------|----------------------------| Install a package | apt install <package name> | pacman -S <package name> | Remove a package | apt remove <package name> | pacman -Rs <package name> | @@ -40,7 +40,7 @@ $ pacman -SyuSince Arch uses a rolling release system there is n $ pacman -Scc
Free up disk space by removing from the cache any packages that are no longer installed. Also removes any cached sync databases.
$ pacman --query --deps --unrequired --quiet | pacman --remove --recursive -
-$ pacman -Qdtq | pacman -Rs -Remove dependencies that are no longer needed, because e.g. the package which needed the dependencies was removed.
I don't have comments as I don't want to manage them. You can however contact me at the below address if you want to.
Email david@davidtsadler.comCopyright © 2021 David T. Sadler.
Return to Homepage.Remove dependencies that are no longer needed, because e.g. the package which needed the dependencies was removed.
I don't have comments as I don't want to manage them. You can however contact me at the below address if you want to.
Email david@davidtsadler.comCopyright © 2021 David T. Sadler.
Return to Homepage.Mon 7th September 2020 By David T. Sadler.
I have been a bash user ever since I started using Linux. But after installing Arch Linux I wanted to give another shell a try and so decided on Zsh. Below is how I went about replacing bash with Zsh.
Zsh is installed via pacman.
$ sudo pacman -S zshCheck that Zsh has been installed by running it from the terminal.
$ zshSince this is the first time that Zsh has been run you should now see zsh-newuser-install which will allow you to setup some basic configuration. If you wish to skip this just press the q key. You can always manually run this with the below commands at a later date.
$ autoload -Uz zsh-newuser-install
-$ zsh-newuser-install -fInstalling Zsh does not automatically make it the system's default shell. The next time you log back in you will find that your current shell is still in use. You can check which shell is been used by looking at the SHELL environment variable.
$ echo $SHELL
+$ zsh-newuser-install -fInstalling Zsh does not automatically make it the system's default shell. The next time you log back in you will find that your current shell is still in use. You can check which shell is been used by looking at the SHELL environment variable.
$ echo $SHELL
/bin/bashTo see a list of shells that have been installed use the chsh command.
$ chsh -l
@@ -29,7 +29,7 @@ $ zsh-newuser-install -fInsta /bin/zsh /usr/bin/zsh
The same command can be used to change the default shell by providing it with the full path to the shell.
$ chsh -s /bin/zshNote that this change is not instant and you will need to log out and log in again for it to take affect. Once you have done that check the SHELL environment variable again to confirm the change.
$ echo $SHELL
-/bin/kshPowerlevel10k is a theme for Zsh and in order to make the most of it you should install the Meslo Nerd Font that has been patched for Powerlevel10k.
$ yay -Sy --noconfirm ttf-meslo-nerd-font-powerlevel10kYou need to configure your terminal to use this font. How this is done is dependant upon what terminal you are using. Since I use st from suckless I need to edit the file config.h and specify MesloLGS NF in the font settings.
static char *font = "MesloLGS NF:pixelsize=14:antialias=true:autohint=true";Before rebuilding st.
$ sudo make installNow that the dependences have been meet Powerlevel10k can be installed.
$ yay -Sy --noconfirm zsh-theme-powerlevel10k-gitOnce it has been installed ensure that Zsh loads Powerlevel10k.
$ echo 'source /usr/share/zsh-theme-powerlevel10k/powerlevel10k.zsh-theme' >>! ~/.zshrcYou can now open a new terminal which will start the Powerlevel10k configuration wizard. This will ask you a few questions and configure your prompt. If it doesn't trigger automatically, type p10k configure.
Once the configuration wizard has finished open a new terminal and you should see the Powerlevel10k theme been used.
I don't have comments as I don't want to manage them. You can however contact me at the below address if you want to.
Email david@davidtsadler.comCopyright © 2021 David T. Sadler.
Return to Homepage.Powerlevel10k is a theme for Zsh and in order to make the most of it you should install the Meslo Nerd Font that has been patched for Powerlevel10k.
$ yay -Sy --noconfirm ttf-meslo-nerd-font-powerlevel10kYou need to configure your terminal to use this font. How this is done is dependant upon what terminal you are using. Since I use st from suckless I need to edit the file config.h and specify MesloLGS NF in the font settings.
static char *font = "MesloLGS NF:pixelsize=14:antialias=true:autohint=true";Before rebuilding st.
$ sudo make installNow that the dependences have been meet Powerlevel10k can be installed.
$ yay -Sy --noconfirm zsh-theme-powerlevel10k-gitOnce it has been installed ensure that Zsh loads Powerlevel10k.
$ echo 'source /usr/share/zsh-theme-powerlevel10k/powerlevel10k.zsh-theme' >>! ~/.zshrcYou can now open a new terminal which will start the Powerlevel10k configuration wizard. This will ask you a few questions and configure your prompt. If it doesn't trigger automatically, type p10k configure.
Once the configuration wizard has finished open a new terminal and you should see the Powerlevel10k theme been used.
I don't have comments as I don't want to manage them. You can however contact me at the below address if you want to.
Email david@davidtsadler.comCopyright © 2021 David T. Sadler.
Return to Homepage.