ls -a /home/user (lists all files, including .bashrc)
cd /var/www (moves to /var/www directory)cd (moves to user's home directory, e.g., /home/user)
pwd (outputs /home/user if you're in that directory)
mkdir projects (creates a directory named projects)
rm -r old_project (removes old_project directory and
its contents)rm -rf temp (forcefully deletes temp directory
without prompting)cp dinesh.txt dinesh_backup.txt (copies dinesh.txt to
dinesh_backup.txt)mv old_dinesh.txt new_dinesh.txt (renames
old_dinesh.txt to new_dinesh.txt)touch dinesh.txt (creates or updates timestamp of
notes.txt)cat > memo.txt (type text, press Ctrl+D to save to
memo.txt)more log.txt (displays log.txt one screen at a time)
head access.log (shows first 10 lines of access.log)
tail -f server.log (shows last 10 lines of server.log
and updates live)ln -s /var/www/html web (creates a symlink named web
to /var/www/html)find / -name config.yml (searches for config.yml
across the filesystem)date (outputs Sat Sep 6 08:41:00 IST 2025)cal (displays September 2025 calendar)uptime (shows system running time, e.g., up 5 days,
2:15)whoami (outputs current username, e.g., user)finger john (shows details about user john, if
installed)uname -a (outputs Linux hostname 5.15.0-73-generic)
cat /proc/cpuinfo (displays CPU details like model
name)man ls (displays the manual page for ls)df -h (shows disk usage in human-readable format)
du -sh /home/user (shows total size of /home/user)
free -m (shows memory usage in megabytes)top (displays real-time process list)ps aux (lists all running processes with details)
top (shows interactive process viewer)kill 1234 (terminates process with PID 1234)killall firefox (terminates all firefox processes)
bg %1 (resumes job 1 in the background)fg %1 (brings job 1 to the foreground)jobs (lists all background or stopped jobs)nice -n 10 tar -czf archive.tar.gz files (runs tar
with lower priority)tar cf backup.tar /home/user/docs (creates backup.tar
from docs)tar xf backup.tar (extracts files from backup.tar)
tar czf backup.tar.gz /home/user/docs (creates
compressed backup.tar.gz)tar xzf backup.tar.gz (extracts backup.tar.gz)tar cjf backup.tar.bz2 /home/user/docs (creates
compressed backup.tar.bz2)tar xjf backup.tar.bz2 (extracts backup.tar.bz2)
gzip log.txt (compresses log.txt to log.txt.gz)gunzip log.txt.gz (decompresses to log.txt)ping google.com (pings google.com to check
connectivity)whois example.com (shows whois data for example.com)
dig example.com (displays DNS records for
example.com)dig -x 8.8.8.8 (performs reverse DNS lookup for IP
8.8.8.8)wget https://dineshc227.github.io/Dinesh/Dinesh_Bk_SRE3%20(1).pdf (downloads
file.pdf)
wget -c https://dineshc227.github.io/Dinesh/Dinesh_Bk_SRE3%20(1).pdf (resumes
downloading file.pdf)
chmod 644 file.txt (sets read/write for owner, read
for others)chown diensh file.txt (changes owner of file.txt to
dinesh)chgrp developers file.txt (changes group of file.txt
to developers)ssh dinesh@192.168.1.100 (connects to 192.168.1.100
as dinesh)ssh -p 2222 dinesh@server.com (connects to server.com
on port 2222)ssh-copy-id dinesh@server.com (copies SSH key to
server.com for dinesh)grep "error" log.txt (searches for "error" in
log.txt)grep -r "config" /etc (searches for "config" in /etc
directory)ls | grep txt (lists files containing "txt" in their
names)locate config.yml (finds all instances of config.yml)
sudo apt update (refreshes package lists on Ubuntu)
sudo apt upgrade (upgrades all installed packages)
sudo apt install vim (installs vim editor)sudo apt remove vim (removes vim package)dpkg -l | grep vim (lists installed packages matching
vim)sudo yum update (updates all packages on older RHEL
systems)sudo dnf update (updates packages on newer RHEL
systems)sudo dnf install httpd (installs Apache web server)
sudo dnf remove httpd (removes Apache web server)
rpm -qa | grep httpd (lists installed RPMs matching
httpd)Ctrl+C while running
ping google.com (stops the ping)
Ctrl+Z while running sleep 100
(pauses sleep)Ctrl+D in terminal (logs out of session)ls dir1 dir2, press Ctrl+W (deletes
dir2)ls -la, press Ctrl+U (clears the
entire line)Ctrl+R, type ls (recalls last ls
command)!! after ls -la (reruns ls -la)exit (closes the terminal session)./script.sh (runs script.sh in current directory)