Linux 100 Commands –
1 pwd – Show current working directory.
2 whoami – Display the current logged-in user.
3 date – Display system date and time.
4 ls – List files and directories.
5 ls -lt – List with modification time (latest first).
6 ls -ltr – List with reverse sorting (latest files last).
7 ls -lh – List with human-readable sizes (KB, MB).
8 clear / Ctrl+L – Clear the terminal screen.
9 cat file – Read and display content of a file.
10 less file – View large file and scroll/search within it.
11 more file – View file content page by page.
12 touch file – Create a new empty file.
13 rm file – Remove a file.
14 vi file – Edit a file using vi editor.
15 nano file – Edit a file with nano editor.
16 mkdir folder – Create a new directory.
17 rmdir folder – Delete empty directory.
18 rm -rf folder – Force remove a folder and its contents.
19 cd folder – Change directory.
20 cd .. – Move one folder up.
21 cd ../.. – Move two levels up.
22 cd /path/to/folder – Go to absolute path.
23 cd folder1/folder2 – Relative navigation inside folders.
24 cp file dest/ – Copy file to another folder.
25 cp file1 file2 – Copy one file content into another.
26 mv file dest/ – Move (cut-paste) a file.
27 mv old new – Rename a file or folder.
28 head -n 5 file – Display top 5 lines of a file.
29 tail -n 5 file – Display last 5 lines of a file.
30 sort file – Sort file lines alphabetically (A-Z).
31 sort -r file – Sort in reverse (Z-A).
32 uniq file – Remove duplicate lines (with sorted input).
33 split -l 3 file – Split file into parts of 3 lines each.
34 grep word file – Search for a word inside a file.
35 grep 'word1|word2' file – Search multiple words in a file.
36 ls x* – List files starting with “x”.
37 *ls .csv – List all .csv files.
38 touch file{1..10} – Create multiple files at once.
39 shuf file – Shuffle lines in a file (random order).
40 wc -l file – Count number of lines in a file.
41 cmp file1 file2 – Check if two files are identical.
42 diff file1 file2 – Show line differences between two files.
43 find . -name file.txt – Search for a file recursively.
44 locate filename – Find file using system database (needs updatedb).
45 history – List previously executed commands.
46 history | grep text – Search specific command usage from history.
47 ls --help – Get syntax and options for a command.
48 man ls – Read manual page for a command.
49 which command – Show binary executable path of command.
50 bc – Open basic calculator in terminal.
51 cal – Display current month’s calendar.
52 cal 2022 – Show calendar of specific year.
53 uptime – Show how long system has been running.
54 script – Record all terminal activities into a file.
55 alias l='ls -ltr' – Create shortcut for long commands.
56 unalias l – Remove defined alias.
57 gzip file – Compress file with gzip.
58 gunzip file.gz – Decompress gzip file.
59 tar -czf backup.tar.gz folder/ – Compress folder to tar.gz.
60 tar -xzf backup.tar.gz – Extract compressed tar.gz file.
61 zip files.zip file1 file2 – Compress multiple files into zip.
62 unzip files.zip – Extract zip archive.
63 unzip -l files.zip – List content of zip file.
64 wget URL – Download a file from internet via URL.
65 curl URL – Fetch or interact with a URL/API.
66 yum install pkg – Install package on RHEL/CentOS.
67 apt install pkg – Install package on Ubuntu/Debian.
68 dnf install pkg – Install package on Fedora.
69 rpm -qa | grep pkg – Check if package is installed.
70 yum list available pkg – List available versions of a package.
71 systemctl start service – Start a service.
72 systemctl stop service – Stop a service.
73 systemctl status service – Check service status.
74 systemctl list-units --type=service --all – List all services.
75 printenv – List all environment variables.
76 export VAR=value – Set environment variable temporarily.
77 source ~/.bashrc – Reload configuration file.
78 awk -F, '{print $2}' file.csv – Print specific column from CSV file.
79 awk -F, '{print $1,$2}' file.csv – Print multiple columns.
80 cut -c1-2 file – Extract characters 1-2 from each line.
81 sed -n '5p' file – Print only the 5th line.
82 sed 's/old/new/g' file – Replace word “old” with “new” globally.
83 tr 'a-z' 'A-Z' < file – Convert lowercase to uppercase.
84 truncate -s 100M file – Set file size to 100MB.
85 fold -w1 file – Break text into vertical lines.
86 su user – Switch to another user.
87 exit – Logout / close terminal session.
88 sudo command – Run command with admin privileges.
89 ssh user@ip – Login to a remote server.
90 scp file user@ip:/path/ – Copy file to remote server.
91 ls -l file – Check permissions of file.
92 chmod o+r file – Add read permission for others.
93 chown user file – Change owner of file.
94 chgrp group file – Change group ownership.
95 free -h – Show memory usage summary.
96 df -h – Show disk usage summary.
97 hostname – Display system hostname.
98 lscpu – Show CPU details (cores, threads).
99 arch – Check system architecture (32/64-bit).
100 lsblk – List storage partitions and mount points.