Appendix A - Essential Commands
This appendix serves as a comprehensive guide to essential terminal commands and shortcuts. Whether you're looking to manage processes, gather system information, or troubleshoot issues, this guide has you covered. Additionally, we've compiled a list of recommended readings to help you explore the world of command-line operations further.
A1 - Essential Terminal Shortcuts
Shortcut | Description |
---|
Ctrl + ALT + F1 | Access the terminal mode |
Ctrl + ALT + F7 | Exit the terminal mode |
Ctrl + C | Stop the current command |
Ctrl + D | Log out of current session |
Ctrl + Esc | List running applications |
A2 - Processes Commands
Command | Description |
---|
htop | Monitor processes & memory |
ps | Display all active processes |
top | Display all running processes |
ps -aux | List all processes |
sudo kill -9 -1 | Kill all processes for all users |
sudo kill [Process-ID] | Kill a process by ID |
sudo xkill | Force kill a certain program |
Command | Description |
---|
neofetch | Display important system info |
xdpyinfo | grep -B2 resolution | Show DPI information |
sudo lsblk -a | Show block device information |
lshw -short | Display hardware info |
lspci | Show PCI buses info |
sudo dmidecode -t baseboard | Show motherboard info |
sudo dmidecode -t bios | Show BIOS info |
sudo dmidecode -t memory | Show Memory / RAM info |
yay -Qi package1 package2 | Displays info about an installed package |
yay -Si package1 package2 | Displays info about any package |
A4 - Update, Clean, Tune
Command | Description |
---|
sudo pacman-mirrors --fasttrack && yay -Syyu | Tune mirrors and update system |
sudo update-grub | Update the boot loader (Grub) |
update-mime-database ~/.local/share/mime | Update the mime database |
yay -Sc; yay -Yc | Clean system |
history -i; rm $HISTFILE | Clean history of zsh terminal |
A5 - Fixing Commands
Command | Description |
---|
sudo rm /var/lib/pacman/db.lck | Remove the Pacman lock |
pacman-key --init && pacman-key --populate && pacman-key --refresh-keys && pacman -Sy archlinux-keyring | Re-populate the keyring keys |
Command | Description |
---|
sudo /opt/lampp/manager-linux-x64.run | Launch XAMPP |
sudo /opt/lampp/lampp start | Start XAMPP |
sudo /opt/lampp/lampp stop | Stop XAMPP |
sudo /opt/lampp/lampp restart | Restart XAMPP |
A7 - Debug Commands
Command | Description |
---|
sudo startx | Start xsession / graphical interface |
chown $USER:$USER .Xauthority | Resolve the boot loop problem |
yay -Q | more | List installed packages |
yay -Qe | more | List explicitly installed packages |
yay -Qm | List manually installed packages |
pacgraph -c | head | Get all sizes of installed packages |
find /var/cache/pacman/pkg/ -iname "*.part" -exec rm {} \; | Resolve "Failed to commit transaction" error |
rm /var/lib/pacman/db.lck | Resolve "Failed to init transaction" error |
rfkill block wlan | Block Wifi |
rfkill unblock wlan | Unblock Wifi |
rfkill block bluetooth | Block Bluetooth |
rfkill unblock bluetooth | Unblock Bluetooth |
A8 - Other Commands
Command | Description |
---|
yay -U <package_path> | Install a package from a URL |
yay -S package1 package2 | Install a program |
yay -Rns package1 package2 | Remove a program |
man [Command] | View the reference manual of a command |
sudo [Command] | Execute a command with root permissions |
sudo find ~/ -name "file" | Search and find a specific file or folder |
ls | List all files and folders in a directory |
ls -al | Formatted listing with hidden files |
whoami | Show the name of the current active user |
pwd | Show current directory |
cd | Change directory to the home directory |
cd dir | Change directory to dir |
mkdir dir | Create a directory with a name dir |
mv file1 file2 | Rename or move file1 to file2 |
cp file1 file2 | Copy file1 to file2 |
cp -r dir1 dir2 | Copy dir1 to dir2 |
rm file | Delete a file |
rm -r dir | Delete a directory |
rm -f file | Force remove a file |
rm -rf dir | Force remove a directory |
Recommended Reading
For those interested in diving deeper into the world of command-line operations, here are some recommended readings:
- "The Linux Command Line" by William E. Shotts, Jr.
- "Linux Pocket Guide" by Daniel J. Barrett
- "Unix and Linux System Administration Handbook" by Evi Nemeth, Garth Snyder, Trent R. Hein, Ben Whaley, and Dan Mackin