- Linux is only a kernel (collection of drivers, task schedulers etc).
- Red Hat, Fedora, Ubuntu, Manjaro, Kali, NixOS etc. are OS distributions (uses the Linux kernel).
- Linux OSes can be used via CLI (suitable for servers) or GUI (suitable for personal laptops/desktops).
- Linux CLI
- sh
- bash
- csh
- ksh
- zsh
- fish
- Linux GUI:
- Window Manager
- X org (DE required)
- Wayland (DE required)
- bspwm
- i3
- i3-gaps
- awesomewm
- dwm
- ...
- Desktop Environment (All requires WM)
- Gnome
- KDE
- Mate
- Unity
- xfce
- ...
- Window Manager
- Linux is multi-user (multiple users can login at the same time)
- "root" is the superuser
cat
to see the contents of a text file e.g.cat /etc/fstab
nslookup
to get the IP address from domain name or vice versa e.g.nslookup ip
,nslookup domain
ifconfig
to get the IP addresses of my machineyum
to install or update packages in RedHat (apt-get
in Ubuntu,pacman
in Arch etc.) e.g.yum update
,yum install python
,yum remove python
ping
to check if a server is online/responding (ICMP is blocked by AWS) e.g.ping ip
,ping domain
ssh
to login into remote servers e.g.ssh -i keyfile username@ip
,ssh username@domain
scp
to login into remote servers e.g.scp -i keyfile /source username@ip:/destination
,scp /source username@domain:/destination
cd
to move into a directory e.g.cd /tmp
mkdir
to make directory e.g.mkdir dir
ls
to list files inside a directory e.g.ls
,ls /tmp
,ls -l
pwd
to get the present working directory e.g.pwd
tracert
to get the gateway IP addresses of the given destination address/domain e.g.traceroute google.com
ip link show
to get the network interfaces, mac addresses (active + inactive)ip route show
to get the gateway addresses of the machine.mount
to mount a filesystem (partition / shared filesystem etc.)umount
to unmount a filesystem (partition / shared filesystem etc.) e.g.mount /dev/sda1 /mnt/directory
fdisk
see and update the attached disks and partitions e.g.fdisk -l
,fdisk /dev/sda
tree
to get the directory treewhich
to get the location of the command e.g.which ls
man
manual for any command. e.g.man ls
df -h
list the mounted partitionssu
switch userwhoami
orid
to see who I am logged in assystemctl start/stop/restart/reload/enable/disable
to manage running serviceschmod
to change file mode. e.g.chmod +x filename
to give execute permission.mv
to move or rename file or directorycp
to copy file or directoryrm
to remove file or directory