diff options
Diffstat (limited to 'www/posts/arch')
8 files changed, 16 insertions, 16 deletions
diff --git a/www/posts/arch/2020-05-25/installing-arch-linux-on-a-thinkpad-x220/index.html b/www/posts/arch/2020-05-25/installing-arch-linux-on-a-thinkpad-x220/index.html index 99104bd..bb54297 100644 --- a/www/posts/arch/2020-05-25/installing-arch-linux-on-a-thinkpad-x220/index.html +++ b/www/posts/arch/2020-05-25/installing-arch-linux-on-a-thinkpad-x220/index.html @@ -118,7 +118,7 @@ efibootmgr \ --loader /vmlinuz-linux \ --unicode 'cryptdevice=PARTUUID='$PARTUUID':cryptlvm root=/dev/vg0/root rw initrd=\intel-ucode.img initrd=\initramfs-linux.img' \ --verbose </pre><p>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.</p><p>Make this script executable.</p><pre><code class="shell">chmod u+x /usr/local/sbin/mkefibootentry</code></pre><p>Run the script to add to the motherboard boot entries.</p><pre><code class="shell">$ mkefibootentry</code></pre><h2>Root Password</h2><p>Create a secure password for the root user.</p><pre><code class="shell">$ passwd</code></pre><h2>Reboot</h2><p>Return to the Arch live installation environment.</p><pre><code class="shell">$ exit</code></pre><p>Unmount the partitions.</p><pre><code class="shell">$ umount -R /mnt</code></pre><p>Restart the machine with reboot. Remember to remove any installation media such as a USB drive.</p><pre><code class="shell">$ reboot</code></pre><p>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. </p><p>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. </p><h3>Links</h3><a href="https://www.archlinux.org/Installation_guide/">Offical Arch Installation Guide.</a><a href="https://www.archlinux.org/download/">Arch Linux Download Page.</a><a href="https://www.balena.io/etcher/">Etcher.</a><a href="https://www.archlinux.org/mirrorlist/">Pacman Mirrorlist Generator.</a><a href="https://en.wikipedia.org/wiki/Howl%27s_Moving_Castle/">Wikipedia Entry for Howl's Moving Castle.</a><a href="/posts/arch/">Arch - Read More Posts.</a><p>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.</p><a href="mailto:david@davidtsadler.com">Email david@davidtsadler.com</a><h3>License</h3><a href="https://creativecommons.org/licenses/by-sa/4.0/">The contents of this site is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.</a><p>Copyright © 2021 David T. Sadler.</p><a href="/">Return to Homepage.</a></section> - <script src="/js/highlight.min.js"></script> - <script src="/js/site.js"></script> + <script defer src="/js/highlight.min.js"></script> + <script defer src="/js/site.js"></script> </body> </html> diff --git a/www/posts/arch/2020-06-15/adding-a-user-in-arch-linux/index.html b/www/posts/arch/2020-06-15/adding-a-user-in-arch-linux/index.html index cfee88e..36d196b 100644 --- a/www/posts/arch/2020-06-15/adding-a-user-in-arch-linux/index.html +++ b/www/posts/arch/2020-06-15/adding-a-user-in-arch-linux/index.html @@ -29,7 +29,7 @@ passwd: password updated successfully</code></pre><p>Now all I have to do is log Password: david@suliman:$</code></pre><h3>Links</h3><a href="/posts/arch/2020-05-25/installing-arch-linux-on-a-x220-thinkpad/">Installing Arch Linux on a Thinkpad X220.</a><a href="/posts/arch/">Arch - Read More Posts.</a><p>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.</p><a href="mailto:david@davidtsadler.com">Email david@davidtsadler.com</a><h3>License</h3><a href="https://creativecommons.org/licenses/by-sa/4.0/">The contents of this site is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.</a><p>Copyright © 2021 David T. Sadler.</p><a href="/">Return to Homepage.</a></section> - <script src="/js/highlight.min.js"></script> - <script src="/js/site.js"></script> + <script defer src="/js/highlight.min.js"></script> + <script defer src="/js/site.js"></script> </body> </html> diff --git a/www/posts/arch/2020-06-22/granting-sudo-access-to-a-user-in-arch-linux/index.html b/www/posts/arch/2020-06-22/granting-sudo-access-to-a-user-in-arch-linux/index.html index a18f4ed..d170782 100644 --- a/www/posts/arch/2020-06-22/granting-sudo-access-to-a-user-in-arch-linux/index.html +++ b/www/posts/arch/2020-06-22/granting-sudo-access-to-a-user-in-arch-linux/index.html @@ -24,7 +24,7 @@ <section><h1>Granting Sudo Access to a User in Arch Linux</h1><blockquote>Mon 22nd 2020 By David T. Sadler.</blockquote><p>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.</p><p>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,</p><pre><code class="shell">$ sudo pacman -Syu</code></pre><p>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. </p><p>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.</p><pre><code class="shell">$ usermod -aG wheel david</code></pre><p>I used the below options with the command.</p><ul><li>-a Modifies the -G argument so that the user is added to the specified groups and not removed from any existing ones.</li><li>-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. </li></ul><p>The sudo package then needed to be installed.</p><pre><code class="shell">$ pacman -S sudo</code></pre><p>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.</p><pre><code class="shell">$ EDITOR=nvim visudo</code></pre><p>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.</p><pre><code class="shell">%wheel ALL(ALL) NOPASSWD: ALL</code></pre><p>I checked that I had sudo access by running the below command while logged into my user account.</p><pre><code class="shell">$ sudo pwd /home/david</code></pre><p>Since I wasn't prompted for my password and the command was executed I knew that I now had sudo access.</p><h3>Links</h3><a href="/posts/arch/2020-06-15/adding-a-user-in-arch-linux/">Adding a User in Arch Linux.</a><a href="/posts/arch/">Arch - Read More Posts.</a><p>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.</p><a href="mailto:david@davidtsadler.com">Email david@davidtsadler.com</a><h3>License</h3><a href="https://creativecommons.org/licenses/by-sa/4.0/">The contents of this site is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.</a><p>Copyright © 2021 David T. Sadler.</p><a href="/">Return to Homepage.</a></section> - <script src="/js/highlight.min.js"></script> - <script src="/js/site.js"></script> + <script defer src="/js/highlight.min.js"></script> + <script defer src="/js/site.js"></script> </body> </html> diff --git a/www/posts/arch/2020-08-17/installing-st-dmenu-dwm-in-arch-linux/index.html b/www/posts/arch/2020-08-17/installing-st-dmenu-dwm-in-arch-linux/index.html index 8c86987..4e314ec 100644 --- a/www/posts/arch/2020-08-17/installing-st-dmenu-dwm-in-arch-linux/index.html +++ b/www/posts/arch/2020-08-17/installing-st-dmenu-dwm-in-arch-linux/index.html @@ -31,7 +31,7 @@ $ sudo make install</code></pre><h2>Configure and Install DMENU</h2><p>Again mov $ sudo make install</code></pre><h2>Configure and Install DWM</h2><p>For the final time move to the directory created earlier.</p><pre><code class="shell">$ cd ~/.local/src/dwm</code></pre><p>As with dmenu the same edit needs to be made to the file config.mk.</p><pre><code class="shell">$ nvim config.mk</code></pre><pre><code class="vim"># XINERAMALIBS = -lXinerama # XINERAMAFLAGS = -DXINERAMA</code></pre><p>Compile and install as usual.</p><pre><code class="shell">$ make clean $ sudo make install</code></pre><h2>Starting DWM</h2><p>Since I have installed xorg-xinit I need to create a .xinitrc in my home folder.</p><pre><code class="shell">$ nvim ~/.xinitrc</code></pre><p>The contents of this file is just.</p><pre><code class="vim">exec dwm</code></pre><p>I can now start xorg and dwm with the below command.</p><pre><code class="shell">$ startx</code></pre><h3>Links</h3><a href="/posts/arch/2020-05-25/installing-arch-linux-on-a-x220-thinkpad/">Installing Arch Linux on a Thinkpad X220.</a><a href="https://dwm.suckless.org/">Dynamic Window Manager (DWM).</a><a href="https://suckless.org/">Suckless Software.</a><a href="https://st.suckless.org/">Simple Terminal.</a><a href="https://tools.suckless.org/dmenu/">DMenu.</a><a href="/posts/arch/">Arch - Read More Posts.</a><p>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.</p><a href="mailto:david@davidtsadler.com">Email david@davidtsadler.com</a><h3>License</h3><a href="https://creativecommons.org/licenses/by-sa/4.0/">The contents of this site is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.</a><p>Copyright © 2021 David T. Sadler.</p><a href="/">Return to Homepage.</a></section> - <script src="/js/highlight.min.js"></script> - <script src="/js/site.js"></script> + <script defer src="/js/highlight.min.js"></script> + <script defer src="/js/site.js"></script> </body> </html> diff --git a/www/posts/arch/2020-08-24/pacman-cheat-sheet-for-ubuntu-users/index.html b/www/posts/arch/2020-08-24/pacman-cheat-sheet-for-ubuntu-users/index.html index e34f122..16e9389 100644 --- a/www/posts/arch/2020-08-24/pacman-cheat-sheet-for-ubuntu-users/index.html +++ b/www/posts/arch/2020-08-24/pacman-cheat-sheet-for-ubuntu-users/index.html @@ -44,7 +44,7 @@ $ pacman -Syu</code></pre><p>Since Arch uses a rolling release system there is n $ pacman -Scc</code></pre><p>Free up disk space by removing from the cache any packages that are no longer installed. Also removes any cached sync databases.</p><h2>Remove Used Dependencies</h2><pre><code class="shell">$ pacman --query --deps --unrequired --quiet | pacman --remove --recursive - $ pacman -Qdtq | pacman -Rs -</code></pre><p>Remove dependencies that are no longer needed, because e.g. the package which needed the dependencies was removed.</p><h3>Links</h3><a href="/posts/arch/2020-05-25/installing-arch-linux-on-a-x220-thinkpad/">Installing Arch Linux on a Thinkpad X220.</a><a href="/posts/arch/">Arch - Read More Posts.</a><p>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.</p><a href="mailto:david@davidtsadler.com">Email david@davidtsadler.com</a><h3>License</h3><a href="https://creativecommons.org/licenses/by-sa/4.0/">The contents of this site is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.</a><p>Copyright © 2021 David T. Sadler.</p><a href="/">Return to Homepage.</a></section> - <script src="/js/highlight.min.js"></script> - <script src="/js/site.js"></script> + <script defer src="/js/highlight.min.js"></script> + <script defer src="/js/site.js"></script> </body> </html> diff --git a/www/posts/arch/2020-08-31/enabling-audio-in-arch-linux/index.html b/www/posts/arch/2020-08-31/enabling-audio-in-arch-linux/index.html index 601959b..63b9b0d 100644 --- a/www/posts/arch/2020-08-31/enabling-audio-in-arch-linux/index.html +++ b/www/posts/arch/2020-08-31/enabling-audio-in-arch-linux/index.html @@ -26,7 +26,7 @@ $ amixer sset Speaker unmute $ amixer sset Headphone unmute</code></pre><p>You can test that the speakers are working with the speaker-test command.</p><pre><code class="shell">$ speaker-test -c 2</code></pre><p>If you are still getting no sound then it could be that the volume has been set to zero. Use amixer again to increase the volume.</p><pre><code class="shell">$ amixer sset Master 100% $ amixer sset Speaker 100% $ amixer sset Headphone 100%</code></pre><h2>Unmute with Alsamixer</h2><p>If you prefer a more intuitive ncurses interface you can use alsamixer.</p><pre><code class="shell">$ alsamixer</code></pre><p>Channels that are muted will have the MM label below them. Unmuted channels have 00.</p><p>Use the ← and → keys to scroll to the muted channel and press m to unmute it.</p><p>The volume can be increased and decreased with the ↑ and ↓ keys.</p><h3>Links</h3><a href="/posts/arch/2020-05-25/installing-arch-linux-on-a-x220-thinkpad/">Installing Arch Linux on a Thinkpad X220.</a><a href="/posts/arch/">Arch - Read More Posts.</a><p>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.</p><a href="mailto:david@davidtsadler.com">Email david@davidtsadler.com</a><h3>License</h3><a href="https://creativecommons.org/licenses/by-sa/4.0/">The contents of this site is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.</a><p>Copyright © 2021 David T. Sadler.</p><a href="/">Return to Homepage.</a></section> - <script src="/js/highlight.min.js"></script> - <script src="/js/site.js"></script> + <script defer src="/js/highlight.min.js"></script> + <script defer src="/js/site.js"></script> </body> </html> diff --git a/www/posts/arch/2020-09-07/installing-zsh-and-powerlevel10k-on-arch-linux/index.html b/www/posts/arch/2020-09-07/installing-zsh-and-powerlevel10k-on-arch-linux/index.html index 0411eb1..14230da 100644 --- a/www/posts/arch/2020-09-07/installing-zsh-and-powerlevel10k-on-arch-linux/index.html +++ b/www/posts/arch/2020-09-07/installing-zsh-and-powerlevel10k-on-arch-linux/index.html @@ -33,7 +33,7 @@ $ zsh-newuser-install -f</code></pre><h2>Changing The Default Shell</h2><p>Insta /usr/bin/zsh</code></pre><p>The same command can be used to change the default shell by providing it with the full path to the shell.</p><pre><code class="shell">$ chsh -s /bin/zsh</code></pre><p>Note 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.</p><pre><code class="shell">$ echo $SHELL /bin/ksh</code></pre><h2>Installing Powerlevel10k</h2><p>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.</p><pre><code class="shell">$ yay -Sy --noconfirm ttf-meslo-nerd-font-powerlevel10k</code></pre><p>You 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.</p><pre><code class="shell">static char *font = "MesloLGS NF:pixelsize=14:antialias=true:autohint=true";</code></pre><p>Before rebuilding st.</p><pre><code class="shell">$ sudo make install</code></pre><p>Now that the dependences have been meet Powerlevel10k can be installed.</p><pre><code class="shell">$ yay -Sy --noconfirm zsh-theme-powerlevel10k-git</code></pre><p>Once it has been installed ensure that Zsh loads Powerlevel10k.</p><pre><code class="shell">$ echo 'source /usr/share/zsh-theme-powerlevel10k/powerlevel10k.zsh-theme' >>! ~/.zshrc</code></pre><p>You 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.</p><p>Once the configuration wizard has finished open a new terminal and you should see the Powerlevel10k theme been used.</p><h3>Links</h3><a href="/posts/arch/2020-05-25/installing-arch-linux-on-a-x220-thinkpad/">Installing Arch Linux on a Thinkpad X220.</a><a href="https://www.zsh.org/">Zsh.</a><a href="https://github.com/romkatv/powerlevel10k/">Powerlevel10k.</a><a href="https://st.suckless.org/">Simple Terminal.</a><a href="/posts/arch/">Arch - Read More Posts.</a><p>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.</p><a href="mailto:david@davidtsadler.com">Email david@davidtsadler.com</a><h3>License</h3><a href="https://creativecommons.org/licenses/by-sa/4.0/">The contents of this site is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.</a><p>Copyright © 2021 David T. Sadler.</p><a href="/">Return to Homepage.</a></section> - <script src="/js/highlight.min.js"></script> - <script src="/js/site.js"></script> + <script defer src="/js/highlight.min.js"></script> + <script defer src="/js/site.js"></script> </body> </html> diff --git a/www/posts/arch/index.html b/www/posts/arch/index.html index dccb40c..16dd9a8 100644 --- a/www/posts/arch/index.html +++ b/www/posts/arch/index.html @@ -22,7 +22,7 @@ </head> <body> <section><h1>The Home of David T. Sadler - All Posts About Arch</h1><a href="/posts/arch/2020-09-07/installing-zsh-and-powerlevel10k-on-arch-linux/">2020-09-07 - Installing Zsh and Powerlevel10k on Arch Linux</a><a href="/posts/arch/2020-08-31/enabling-audio-in-arch-linux/">2020-08-31 - Enabling Audio in Arch Linux</a><a href="/posts/arch/2020-08-24/pacman-cheat-sheet-for-ubuntu-users/">2020-08-24 - Pacman Cheat Sheet For Ubuntu Users</a><a href="/posts/arch/2020-08-17/installing-st-dmenu-dwm-in-arch-linux/">2020-08-17 - Installing ST, DMENU and DWM in Arch Linux</a><a href="/posts/arch/2020-06-22/granting-sudo-access-to-a-user-in-arch-linux/">2020-06-22 - Granting Sudo Access to a User in Arch Linux</a><a href="/posts/arch/2020-06-15/adding-a-user-in-arch-linux/">2020-06-15 - Adding a User in Arch Linux</a><a href="/posts/arch/2020-05-25/installing-arch-linux-on-a-thinkpad-x220/">2020-05-25 - Installing Arch Linux on a Thinkpad X220</a><h3>License</h3><a href="https://creativecommons.org/licenses/by-sa/4.0/">The contents of this site is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.</a><p>Copyright © 2021 David T. Sadler.</p><a href="/">Return to Homepage.</a></section> - <script src="/js/highlight.min.js"></script> - <script src="/js/site.js"></script> + <script defer src="/js/highlight.min.js"></script> + <script defer src="/js/site.js"></script> </body> </html> |
