Top 100 Basic Linux Commands

Linux commands are essential for system administrators, DevOps engineers, cybersecurity professionals, cloud engineers, and developers. Here we are presenting the top 100 important Linux commands with short explanations and examples.

1–10: File & Directory Management

CommandExplanation
pwdShows current working directory
lsLists files and directories
cdChanges directory
mkdirCreates a new directory
rmdirRemoves empty directories
touchCreates empty files
cpCopies files/directories
mvMoves or renames files
rmDeletes files/directories
treeDisplays directory structure

Example:

ls -lh
mkdir projects
rm -r oldfolder

11–20: File Viewing & Editing

CommandExplanation
catDisplays file contents
lessView large files page by page
moreBasic file viewer
headShows first lines of file
tailShows last lines of file
nanoTerminal text editor
vi / vimAdvanced text editor
echoPrints text/output
teeWrites output to file and screen
wcCounts lines, words, characters

Example:

tail -f /var/log/syslog
head -10 file.txt

21–30: Searching & Filtering

CommandExplanation
grepSearches text patterns
findFinds files/directories
locateQuickly locates files
whichShows command location
whereisFinds binary/source/manual
sortSorts text
uniqRemoves duplicate lines
cutExtracts columns
awkPattern scanning and processing
sedStream editor for text manipulation

Example:

grep “failed” auth.log
find /home -name “*.txt”

31–40: Permissions & Ownership

CommandExplanation
chmodChanges file permissions
chownChanges ownership
chgrpChanges group ownership
umaskSets default permissions
passwdChanges user password
suSwitches user
sudoExecutes command as root
idShows user/group IDs
groupsDisplays user groups
whoamiShows current username

Example:

chmod 755 script.sh
sudo chown user:user file.txt

41–50: Process Management

CommandExplanation
psDisplays running processes
topReal-time process monitoring
htopInteractive process viewer
killTerminates process
killallKills processes by name
pkillKills matching process
jobsLists background jobs
bgRuns process in background
fgBrings process to foreground
niceStarts process with priority

Example:

ps aux
kill -9 1234

51–60: Disk & Storage Management

CommandExplanation
dfShows disk space usage
duShows directory/file size
fdiskDisk partition manager
lsblkLists block devices
mountMounts file systems
umountUnmounts file systems
mkfsCreates filesystem
fsckFilesystem check
blkidDisplays block device UUID
partedAdvanced partition tool

Example:

df -h
lsblk

61–70: Networking Commands

CommandExplanation
pingTests connectivity
ifconfigNetwork interface config
ipModern network configuration
netstatNetwork statistics
ssSocket statistics
tracerouteTracks packet route
nslookupDNS lookup
digAdvanced DNS query
curlTransfers data from URLs
wgetDownloads files

Example:

ping google.com
curl https://example.com

71–80: System Information

CommandExplanation
unameSystem information
hostnameDisplays hostname
uptimeSystem running time
dateDisplays current date/time
calShows calendar
freeMemory usage
vmstatVirtual memory stats
lscpuCPU information
lsmemMemory details
dmesgKernel logs

Example:

uname -a
free -m

81–90: Compression & Archiving

CommandExplanation
tarArchive files
gzipCompress files
gunzipDecompress gzip files
zipCreates ZIP archive
unzipExtracts ZIP archive
bzip2Compresses files
xzHigh-ratio compression
rsyncFile synchronization
scpSecure file copy
sftpSecure file transfer

Example:

tar -cvf backup.tar folder/
tar -xvf backup.tar

91–100: Advanced & Useful Commands

CommandExplanation
historyShows command history
aliasCreates command shortcuts
crontabSchedules tasks
systemctlControls system services
journalctlViews system logs
serviceManages services
rebootRestarts system
shutdownPowers off system
envDisplays environment variables
xargsBuilds command arguments

Example:

systemctl status ssh crontab -e