
Learn Essential Tools Linux (commands) to navigate the system, manage files, and control processes. Applies to Ubuntu, Debian, CentOS, and AlmaLinux.
- USB drive (8 GB or more)
- ISO image of Ubuntu, Debian, CentOS, or AlmaLinux
- Rufus (Windows) or balenaEtcher (Mac/Linux/Windows) to create bootable USB
- Internet connection for updates (optional, but recommended)
Before starting make sure ur linux is ready.
- Ubuntu: ubuntu.com/download
- Debian: debian.org/distrib
- CentOS Stream: centos.org/download
- AlmaLinux: almalinux.org/download
- Talkecho full toturial: Click here
Navigation Commands
# show current directory
pwd
# list files in directory
ls
ls -l # detailed view
ls -lh # human-readable sizes
ls -a # include hidden files
# change directory
cd /home
cd .. # go up one level
cd ~ # go to home directory
cd - # go to previous directory
# get absolute path
readlink -f .
File & Directory Management
# create a new directory
mkdir myfolder
mkdir -p new/folder/path # create nested directories
# create an empty file
touch notes.txt
# copy files
cp file.txt /tmp/
cp -r dir1/ dir2/ # copy directories recursively
# move (or rename) files
mv file.txt documents/
mv oldname.txt newname.txt # rename file
# remove files and directories
rm file.txt
rm -r old_folder/
rm -rf /tmp/tempfiles/ # force remove without prompt
Viewing & Editing Files
# print file contents
cat file.txt
# view file one page at a time
less file.txt
more file.txt
# show first 10 lines
head file.txt
head -n 20 file.txt # show first 20 lines
# show last 10 lines
tail file.txt
tail -f /var/log/syslog # follow logs live
# edit a file in terminal
nano file.txt
vi file.txt
vim file.txt # improved vi editor
System Information
# show date and time
date
# show current user
whoami
# show logged-in users
who
w
# show disk usage
df -h
du -sh * # disk usage of files/folders in current directory
# show memory usage
free -h
vmstat
# system uptime
uptime
uname -a # system and kernel info
Process Management
# show running processes
ps aux
ps -ef
# dynamic process viewer
top
htop # (install via: sudo apt install htop OR sudo dnf install htop)
# kill a process by ID
kill 1234
kill -9 1234 # force kill
# kill by name
pkill firefox
killall firefox
Permissions & Ownership
# show permissions
ls -l
# change permissions (read/write/execute)
chmod 755 script.sh
chmod +x run.sh # add execute permission
# change file owner
sudo chown user:user file.txt
sudo chown -R user:group /var/www/ # recursively change owner
Networking Basics
For more about networking click here# show IP address
ip a
ifconfig # (may need: sudo apt install net-tools)
# test connectivity
ping google.com
ping -c 4 example.com # send 4 packets
# download file
wget http://example.com/file.zip
curl -O http://example.com/file.zip
# check open ports
netstat -tuln
ss -tuln