Show Menu
Cheatography

Linux and Arch commands Cheat Sheet (DRAFT) by

Linux and Arch commands important commands, no basic commands

This is a draft cheat sheet. It is a work in progress and is not finished yet.

yay/pacman

yay -S [--noc­onfirm] <pa­cka­ge>
Install a package
yay -Ss <pa­cka­ge>
Search a package
yay -Si <pa­cka­ge>
Package inform­ation
yay -U path
Install a local package
yay -Qq package
List of all package
yay -Qm
List of non-of­icial package
yay -Pu
List of packages that needs to be updated
yay -R <pa­cka­ge>
Remove a package
yay -Rnsc <pa­cka­ge>
Remove a package, depend­encies and config
yay -Sya
Update the system

redire­cting

a > b
Redirect stdout to b
$(!!)
Redirect the last command output in a new one
 

find

find <st­art­ing­dir­ect­ory> <op­tio­ns> <search term>
Basic structure
find . -name "­file”
Find by name
find . -iname "­file”
Find by name, ignoring CL
find . -name “*.format”
Find by format
find . -not -name "­fil­e"
Exclude a name
find . -type "­typ­e"
f:file, d:dire­ctory, l:link...
find . -empty
Empty files and directory
find . -exec
Find executable programs
 

system and kernel

uname
Kernel name
uname -v
Kernel version
lscpu
List CPU inform­ation
screen­fetch
Arch Linux system inform­ation
hwinfo
All hardware inform­ation
lspci
List PCI
lsusb
List USB
fdisk -l
List disk partitions
top
System processes monitoring
inxi -G
List installed drivers

ls

-a
Show all
-R
Recursive list
-S
Sort by size
-l
Long listing
-d
Only direct­ories
-a
Hidden files/­dir­ect­ories
-lias
Full listing