100 Essential Linux Commands: The Ultimate Guide [2025]
Written on April 10, 2025 by Shaik VahidDevOps Engg

100 Essential Linux Commands: The Ultimate Guide [2025]

Introduction

Linux powers everything from personal computers to enterprise servers, cloud infrastructure, and even Android smartphones. Whether you're a system administrator, developer, or curious user looking to expand your technical skills, mastering Linux commands is essential for efficiently managing and navigating Linux systems.

This comprehensive guide covers 100 of the most useful Linux commands, organized by category to help you find exactly what you need. Each command includes a clear explanation, common use cases, and practical examples to enhance your understanding. By the end of this guide, you'll have a powerful toolkit of commands to tackle almost any task in your Linux environment.

Table of Contents:

File and Directory Management

1. ls - List Directory Contents

The ls command is one of the most frequently used commands in Linux. It lists the contents of a directory.

Basic usage:

ls

Common options:

  • ls -l: Long format listing (shows permissions, owner, size, date)
  • ls -a: List all files (including hidden files)
  • ls -la: Combine long format and all files
  • ls -lh: Human-readable file sizes (KB, MB, GB)

File-Management-Commands.jpg

2. cd - Change Directory

The cd command is used to navigate between directories.

Basic usage:

cd /path/to/directory

Common uses:

  • cd ..: Move to parent directory
  • cd ~: Move to home directory
  • cd -: Move to previous directory
  • cd /: Move to root directory

3. pwd - Print Working Directory

pwd displays the full path of your current directory.

Basic usage:

pwd

4. mkdir - Make Directory

The mkdir command creates new directories.

Basic usage:

mkdir new_directory

Common options:

  • mkdir -p parent/child/grandchild: Create nested directories

5. rmdir - Remove Directory

rmdir removes empty directories.

Basic usage:

rmdir directory_name

6. rm - Remove Files or Directories

The rm command deletes files or directories.

Basic usage:

rm filename

Common options:

  • rm -r directory: Remove directory and its contents recursively
  • rm -f file: Force removal without confirmation
  • rm -i file: Interactive mode (asks for confirmation)

Warning: Be extremely careful with rm -rf as it can delete files and directories without confirmation!

7. cp - Copy Files and Directories

cp copies files and directories from one location to another.

Basic usage:

cp source destination

Common options:

  • cp -r source_dir destination_dir: Copy directories recursively
  • cp -i source destination: Interactive mode (asks before overwriting)
  • cp -p source destination: Preserve file attributes (permissions, timestamps)

8. mv - Move or Rename Files and Directories

The mv command moves or renames files and directories.

Basic usage:

mv source destination

Common uses:

  • mv file1 file2: Rename file1 to file2
  • mv file directory/: Move file to directory
  • mv -i source destination: Interactive mode (asks before overwriting)

9. touch - Create Empty Files or Update Timestamps

touch creates empty files or updates the access and modification times of existing files.

Basic usage:

touch filename

Common options:

  • touch -a filename: Update only access time
  • touch -m filename: Update only modification time
  • touch -c filename: Don't create file if it doesn't exist

10. ln - Create Links Between Files

The ln command creates links between files.

Basic usage:

ln -s target_file link_name

Common options:

  • ln -s: Create symbolic link (soft link)
  • ln: Create hard link

File Viewing and Editing

11. cat - Concatenate and Display File Contents

cat displays the contents of files.

Basic usage:

cat filename

Common options:

  • cat -n filename: Show line numbers
  • cat file1 file2: Concatenate multiple files
  • cat > file: Create a new file (end with Ctrl+D)

12. less - View File Contents Page by Page

The less command allows you to view file contents page by page.

Basic usage:

less filename

Navigation in less:

  • Space bar: Next page
  • b: Previous page
  • q: Quit
  • /pattern: Search forward for pattern
  • ?pattern: Search backward for pattern

13. head - Display the Beginning of a File

head displays the first part of a file.

Basic usage:

head filename

Common options:

  • head -n 20 filename: Display first 20 lines

14. tail - Display the End of a File

tail displays the last part of a file.

Basic usage:

tail filename

Common options:

  • tail -n 20 filename: Display last 20 lines
  • tail -f logfile: Follow mode (continuously update as file grows)

Process-Management.jpg

15. nano - Simple Text Editor

nano is a user-friendly text editor for beginners.

Basic usage:

nano filename

Common shortcuts:

  • Ctrl+O: Save
  • Ctrl+X: Exit
  • Ctrl+K: Cut line
  • Ctrl+U: Paste line

16. vim - Advanced Text Editor

vim is a powerful text editor with a steeper learning curve.

Basic usage:

vim filename

Basic commands in vim:

  • i: Enter insert mode
  • Esc: Return to command mode
  • :w: Save
  • :q: Quit
  • :wq: Save and quit
  • :q!: Quit without saving

17. diff - Compare Files Line by Line

The diff command compares files line by line.

Basic usage:

diff file1 file2

Common options:

  • diff -u file1 file2: Unified format
  • diff -y file1 file2: Side-by-side comparison

File Compression and Archiving

18. tar - Archive Files

The tar command creates and extracts archives.

Basic usage:

# Create archive
tar -cvf archive.tar files

# Extract archive
tar -xvf archive.tar

Common options:

  • c: Create archive
  • x: Extract archive
  • v: Verbose (show progress)
  • f: Specify filename
  • z: Compress with gzip
  • j: Compress with bzip2

19. gzip - Compress Files

gzip compresses files using the gzip algorithm.

Basic usage:

gzip filename

Common options:

  • gzip -d file.gz: Decompress (same as gunzip)
  • gzip -k file: Keep original file
  • gzip -9 file: Best compression

20. zip/unzip - Compress/Extract Zip Archives

The zip and unzip commands work with ZIP archives.

Basic usage:

# Create zip archive
zip archive.zip files

# Extract zip archive
unzip archive.zip

Common options:

  • zip -r archive.zip directory: Recursively zip directory
  • unzip -l archive.zip: List contents without extracting

File Permissions and Ownership

21. chmod - Change File Permissions

The chmod command changes file permissions.

Basic usage:

chmod permissions filename

Permission examples:

  • chmod 755 file: rwx for owner, rx for group and others
  • chmod +x file: Add execute permission for all
  • chmod u+w file: Add write permission for owner
  • chmod g-w file: Remove write permission for group

22. chown - Change File Owner and Group

chown changes the owner and group of files and directories.

Basic usage:

chown owner:group filename

Examples:

  • chown user file: Change owner to user
  • chown user:group file: Change owner and group
  • chown -R user:group directory: Recursively change ownership

23. chgrp - Change Group Ownership

The chgrp command changes the group ownership of files.

Basic usage:

chgrp group filename

Common options:

  • chgrp -R group directory: Recursively change group

Process Management

24. ps - Display Process Status

The ps command shows information about active processes.

Basic usage:

ps

Common options:

  • ps aux: Show all processes for all users
  • ps -ef: Full format listing
  • ps --forest: Show process tree

Network-Commands.jpg

25. top - Monitor System Processes in Real-Time

top provides a dynamic, real-time view of running processes.

Basic usage:

top

Interactive commands in top:

  • q: Quit
  • k: Kill a process
  • r: Renice a process
  • f: Add/remove fields
  • P: Sort by CPU usage
  • M: Sort by memory usage

26. kill - Terminate Processes

The kill command sends signals to processes, often used to terminate them.

Basic usage:

kill PID

Common signals:

  • kill -9 PID: Force kill (SIGKILL)
  • kill -15 PID: Graceful termination (SIGTERM, default)
  • kill -1 PID: Reload configuration (SIGHUP)

27. killall - Kill Processes by Name

killall terminates processes by name.

Basic usage:

killall process_name

Example:

killall firefox

28. pkill - Kill Processes Based on Name and Other Attributes

The pkill command allows killing processes based on name and other attributes.

Basic usage:

pkill process_name

Common options:

  • pkill -u username: Kill processes owned by username
  • pkill -9 process_name: Force kill

29. bg - Send Processes to Background

bg continues execution of suspended jobs in the background.

Basic usage:

bg [job_spec]

30. fg - Bring Background Processes to Foreground

The fg command brings background jobs to the foreground.

Basic usage:

fg [job_spec]

31. jobs - List Background Jobs

jobs lists the active jobs in the current shell.

Basic usage:

jobs

Common options:

  • jobs -l: Include process IDs

32. nice - Run a Command with Modified Scheduling Priority

The nice command runs a program with modified scheduling priority.

Basic usage:

nice -n priority command

Example:

nice -n 10 ./cpu_intensive_task

System Information

33. uname - Print System Information

uname displays system information.

Basic usage:

uname

Common options:

  • uname -a: All information
  • uname -r: Kernel release
  • uname -m: Machine hardware name

34. whoami - Print Current User

The whoami command displays the current username.

Basic usage:

whoami

35. who - Show Who Is Logged On

who shows who is logged on.

Basic usage:

who

36. date - Display or Set the System Date and Time

The date command displays or sets the system date and time.

Basic usage:

date

Common formats:

  • date "+%Y-%m-%d": Display date as YYYY-MM-DD
  • date "+%H:%M:%S": Display time as HH:MM:SS

37. uptime - Show How Long the System Has Been Running

uptime shows how long the system has been running.

Basic usage:

uptime

38. free - Display Amount of Free and Used Memory

The free command displays the amount of free and used memory.

Basic usage:

free

Common options:

  • free -h: Human-readable output
  • free -m: Display in megabytes
  • free -g: Display in gigabytes

Security-Commands.jpg

39. df - Report File System Disk Space Usage

df reports file system disk space usage.

Basic usage:

df

Common options:

  • df -h: Human-readable output
  • df -T: Show file system type

40. du - Estimate File Space Usage

The du command estimates file space usage.

Basic usage:

du directory

Common options:

  • du -h: Human-readable sizes
  • du -s: Summary (only total)
  • du -a: Include all files, not just directories

User Management

41. useradd - Create a New User

useradd creates a new user account.

Basic usage:

sudo useradd username

Common options:

  • useradd -m username: Create home directory
  • useradd -G group1,group2 username: Add to supplementary groups
  • useradd -s /bin/bash username: Specify shell

42. userdel - Delete a User Account

The userdel command deletes a user account.

Basic usage:

sudo userdel username

Common options:

  • userdel -r username: Remove home directory and mail spool

43. usermod - Modify a User Account

usermod modifies a user account.

Basic usage:

sudo usermod options username

Common options:

  • usermod -aG group username: Add to supplementary group
  • usermod -L username: Lock account
  • usermod -U username: Unlock account

44. passwd - Change User Password

The passwd command changes user passwords.

Basic usage:

passwd

Common options:

  • passwd username: Change another user's password (as root)
  • passwd -l username: Lock account
  • passwd -u username: Unlock account

45. groupadd - Create a New Group

groupadd creates a new group.

Basic usage:

sudo groupadd groupname

46. groupdel - Delete a Group

The groupdel command deletes a group.

Basic usage:

sudo groupdel groupname

47. su - Switch User

su allows you to switch to another user.

Basic usage:

su username

Common options:

  • su -: Switch to root with environment
  • su - username: Switch to user with environment

48. sudo - Execute Command as Another User

The sudo command executes a command as another user (typically root).

Basic usage:

sudo command

Common options:

  • sudo -u username command: Run as specified user
  • sudo -i: Start a shell as root

Network Commands

49. ping - Test Network Connectivity

ping sends ICMP echo requests to network hosts.

Basic usage:

ping hostname

Common options:

  • ping -c 5 hostname: Send 5 packets only
  • ping -i 2 hostname: Wait 2 seconds between packets

50. ifconfig - Configure Network Interface

The ifconfig command configures network interfaces.

Basic usage:

ifconfig

Common options:

  • ifconfig interface: Show specific interface
  • ifconfig interface up/down: Enable/disable interface

Note: On newer systems, ip command is preferred.

51. ip - Show/Manipulate Routing, Network Devices, Interfaces

The ip command is the modern replacement for ifconfig.

Basic usage:

ip addr show

Common subcommands:

  • ip link: Network device operations
  • ip addr: Protocol address management
  • ip route: Routing table management

52. netstat - Network Statistics

netstat displays network connections, routing tables, and more.

Basic usage:

netstat

Common options:

  • netstat -tuln: Show listening TCP and UDP ports
  • netstat -r: Show routing table
  • netstat -i: Show network interfaces

53. ss - Socket Statistics

The ss command is a newer alternative to netstat.

Basic usage:

ss

Common options:

  • ss -tuln: Show listening TCP and UDP ports
  • ss -ta: Show all TCP connections

54. wget - Download Files from the Web

wget downloads files from the web.

Basic usage:

wget URL

Common options:

  • wget -O filename URL: Save with different filename
  • wget -c URL: Continue interrupted download
  • wget -r URL: Recursive download

55. curl - Transfer Data from or to a Server

The curl command transfers data from or to a server.

Basic usage:

curl URL

Common options:

  • curl -o filename URL: Save output to file
  • curl -I URL: Fetch HTTP headers only
  • curl -X POST URL -d "data": Send POST request

56. ssh - Secure Shell Client

ssh is a secure shell client for remote login.

Basic usage:

ssh user@hostname

Common options:

  • ssh -p port user@hostname: Connect to specific port
  • ssh -i key_file user@hostname: Use specific identity file

57. scp - Securely Copy Files Between Hosts

The scp command securely copies files between hosts.

Basic usage:

scp source user@host:destination

Examples:

  • scp file.txt user@remote:/path/: Copy local file to remote
  • scp user@remote:/path/file.txt local/: Copy remote file to local
  • scp -r directory user@remote:/path/: Copy directory recursively

58. rsync - Remote File Synchronization

rsync synchronizes files and directories between locations.

Basic usage:

rsync options source destination

Common options:

  • rsync -avz source/ destination/: Archive mode with compression
  • rsync -avz --delete source/ destination/: Delete files in destination not in source
  • rsync -avz -e ssh source/ user@host:destination/: Use SSH as transport

Package Management

59. apt - Advanced Package Tool (Debian/Ubuntu)

apt manages packages on Debian-based systems.

Basic usage:

sudo apt update
sudo apt install package

Common commands:

  • apt update: Update package lists
  • apt upgrade: Upgrade installed packages
  • apt install package: Install package
  • apt remove package: Remove package
  • apt search package: Search for package

60. apt-get - APT Package Handling Utility (Debian/Ubuntu)

apt-get is a command-line tool for handling packages.

Basic usage:

sudo apt-get update
sudo apt-get install package

Common commands:

  • apt-get update: Update package lists
  • apt-get upgrade: Upgrade packages
  • apt-get dist-upgrade: Upgrade with dependency handling
  • apt-get autoremove: Remove unnecessary packages

61. dpkg - Debian Package Manager

The dpkg command manages Debian packages.

Basic usage:

sudo dpkg -i package.deb

Common options:

  • dpkg -i package.deb: Install package
  • dpkg -r package: Remove package
  • dpkg -l: List installed packages
  • dpkg -S file: Find which package a file belongs to

62. yum - Yellowdog Updater Modified (RHEL/CentOS)

yum manages packages on Red Hat-based systems.

Basic usage:

sudo yum install package

Common commands:

  • yum update: Update packages
  • yum install package: Install package
  • yum remove package: Remove package
  • yum search keyword: Search for packages

63. dnf - Dandified YUM (Fedora)

dnf is the next-generation version of yum.

Basic usage:

sudo dnf install package

Common commands:

  • dnf update: Update packages
  • dnf search term: Search for packages
  • dnf list installed: List installed packages

64. rpm - RPM Package Manager

The rpm command manages RPM packages.

Basic usage:

sudo rpm -i package.rpm

Common options:

  • rpm -i package.rpm: Install package
  • rpm -e package: Erase (remove) package
  • rpm -q package: Query if package is installed
  • rpm -qa: List all installed packages

Disk and Storage Management

65. fdisk - Manipulate Disk Partition Table

fdisk is a dialog-driven program for partition manipulation.

Basic usage:

sudo fdisk /dev/sdX

Common commands within fdisk:

  • p: Print partition table
  • n: Add a new partition
  • d: Delete a partition
  • w: Write changes and exit
  • q: Quit without saving changes

66. mount - Mount a Filesystem

The mount command mounts a filesystem.

Basic usage:

sudo mount device directory

Examples:

  • mount /dev/sdb1 /mnt: Mount partition to /mnt
  • mount -t type device directory: Specify filesystem type

67. umount - Unmount a Filesystem

umount unmounts a filesystem.

Basic usage:

sudo umount directory

Common options:

  • umount -f directory: Force unmount
  • umount -l directory: Lazy unmount

68. lsblk - List Block Devices

The lsblk command lists information about all block devices.

Basic usage:

lsblk

Common options:

  • lsblk -f: Show filesystem information
  • lsblk -m: Show permissions

69. blkid - Display Block Device Attributes

blkid displays attributes of block devices.

Basic usage:

sudo blkid

Common options:

  • blkid /dev/sdX: Show specific device

70. mkfs - Build a Linux Filesystem

The mkfs command builds a Linux filesystem.

Basic usage:

sudo mkfs -t type device

Examples:

  • mkfs.ext4 /dev/sdb1: Create ext4 filesystem
  • mkfs.ntfs /dev/sdc1: Create NTFS filesystem

Search Commands

71. find - Search for Files in a Directory Hierarchy

find searches for files in a directory hierarchy.

Basic usage:

find path -name pattern

Common options:

  • find /home -name "*.txt": Find .txt files in /home
  • find / -type f -size +100M: Find files larger than 100MB
  • find /var -mtime -7: Find files modified in the last 7 days
  • find . -type f -exec command {} \;: Execute command on each file

72. locate - Find Files by Name

The locate command finds files by name, using a database.

Basic usage:

locate pattern

Common options:

  • locate -i pattern: Case-insensitive search
  • updatedb: Update the locate database

73. whereis - Locate the Binary, Source, and Manual Page Files

whereis locates the binary, source, and manual page files for a command.

Basic usage:

whereis command

Common options:

  • whereis -b command: Search only for binaries

74. which - Locate a Command

The which command shows the full path of shell commands.

Basic usage:

which command

Example:

which python

Text Processing

75. grep - Search Text for Patterns

grep searches text for patterns.

Basic usage:

grep pattern file

Common options:

  • grep -i pattern file: Case-insensitive search
  • grep -r pattern directory: Recursive search
  • grep -v pattern file: Invert match (lines NOT matching)
  • grep -n pattern file: Show line numbers

76. egrep - Extended grep

The egrep command is like grep but uses extended regular expressions.

Basic usage:

egrep "pattern1|pattern2" file

77. sed - Stream Editor

sed is a stream editor for filtering and transforming text.

Basic usage:

sed 's/old/new/' file

Common uses:

  • sed 's/old/new/g' file: Replace all occurrences
  • sed -i 's/old/new/g' file: Edit file in place
  • sed '5d' file: Delete line 5
  • sed '/pattern/d' file: Delete lines matching pattern

78. awk - Pattern Scanning and Processing Language

The awk command is a powerful text processing tool.

Basic usage:

awk 'pattern {action}' file

Examples:

  • awk '{print $1}' file: Print first column
  • awk -F: '{print $1}' /etc/passwd: Set field separator to ":"
  • awk '/pattern/ {print $0}': Print lines matching pattern

79. sort - Sort Lines of Text Files

sort sorts lines of text files.

Basic usage:

sort file

Common options:

  • sort -r file: Reverse order
  • sort -n file: Numeric sort
  • sort -k 2 file: Sort by second field
  • sort -u file: Remove duplicates

80. uniq - Report or Omit Repeated Lines

The uniq command filters adjacent matching lines.

Basic usage:

uniq file

Common options:

  • uniq -c file: Count occurrences
  • uniq -d file: Only print duplicate lines

81. wc - Print Line, Word, and Byte Counts

wc prints newline, word, and byte counts.

Basic usage:

wc file

Common options:

  • wc -l file: Count lines only
  • wc -w file: Count words only
  • wc -c file: Count bytes only

82. cut - Remove Sections from Lines of Files

The cut command removes sections from lines of files.

Basic usage:

cut options file

Common options:

  • cut -d: -f1 /etc/passwd: Cut field 1 using ":" as delimiter
  • cut -c1-5 file: Cut characters 1-5 from each line

Shell Scripting Commands

83. echo - Display a Line of Text

echo displays a line of text.

Basic usage:

echo "Hello, World!"

Common options:

  • echo -n "text": No trailing newline
  • echo -e "line1\nline2": Interpret backslash escapes

84. read - Read from Standard Input

The read command reads a line from standard input.

Basic usage:

read variable

Common options:

  • read -p "Prompt: " variable: Display prompt
  • read -s variable: Silent mode (for passwords)
  • read -t 10 variable: Timeout after 10 seconds

85. test - Check File Types and Compare Values

test evaluates expressions.

Basic usage:

test expression

Alternative syntax:

[ expression ]

Common tests:

  • [ -f file ]: True if file exists and is regular file
  • [ -d directory ]: True if directory exists
  • [ string1 = string2 ]: True if strings are equal
  • [ $num1 -eq $num2 ]: True if numbers are equal

86. if - Conditional Statement

The if command performs conditional execution.

Basic syntax:

if condition; then
    commands
elif condition; then
    commands
else
    commands
fi

87. for - Loop Over a List

for loops over a list of values.

Basic syntax:

for variable in list; do
    commands
done

Example:

for i in 1 2 3; do
    echo $i
done

88. while - Loop While a Condition Is True

The while command loops while a condition is true.

Basic syntax:

while condition; do
    commands
done

Example:

i=1
while [ $i -le 5 ]; do
    echo $i
    i=$((i+1))
done

89. case - Conditional Branching

case provides conditional branching based on pattern matching.

Basic syntax:

case expression in
    pattern1) commands ;;
    pattern2) commands ;;
    *) default commands ;;
esac

90. source - Run Commands from a File

The source command runs commands from a file in the current shell.

Basic usage:

source filename

Alternative:

. filename

Performance Monitoring

91. htop - Interactive Process Viewer

htop is an interactive process viewer.

Basic usage:

htop

Features:

  • Interactive process killing and renicing
  • Colorful output
  • Tree view of processes
  • CPU, memory, and swap usage meters

92. iostat - Report CPU and I/O Statistics

The iostat command reports CPU and I/O statistics.

Basic usage:

iostat

Common options:

  • iostat -d: Device utilization report
  • iostat -x: Extended statistics
  • iostat 2 5: Report every 2 seconds, 5 times

93. vmstat - Report Virtual Memory Statistics

vmstat reports virtual memory statistics.

Basic usage:

vmstat

Common options:

  • vmstat 2 5: Report every 2 seconds, 5 times
  • vmstat -S M: Display in megabytes

94. mpstat - Report Processors Statistics

The mpstat command reports processors statistics.

Basic usage:

mpstat

Common options:

  • mpstat -P ALL: Show statistics for all CPUs
  • mpstat 2 5: Report every 2 seconds, 5 times

95. netstat - Network Statistics

The netstat command displays network connections, routing tables, and more.

Basic usage:

netstat

Common options:

  • netstat -a: Show all sockets
  • netstat -r: Show routing table
  • netstat -s: Show statistics by protocol

Security Commands

96. passwd - Change User Password

passwd changes user passwords.

Basic usage:

passwd

Common options:

  • passwd username: Change another user's password (as root)
  • passwd -l username: Lock user account
  • passwd -u username: Unlock user account

97. chmod - Change File Permissions

The chmod command changes file permissions.

Basic usage:

chmod permissions file

Examples:

  • chmod 755 file: rwx for owner, rx for group and others
  • chmod +x file: Add execute permission
  • chmod -R 750 directory: Recursively change permissions

System-Information.jpg

98. chown - Change File Owner and Group

chown changes file owner and group.

Basic usage:

chown owner:group file

Common options:

  • chown -R user:group directory: Recursively change ownership

99. ssh-keygen - Generate SSH Keys

The ssh-keygen command generates, manages, and converts authentication keys.

Basic usage:

ssh-keygen

Common options:

  • ssh-keygen -t rsa: Generate RSA key pair
  • ssh-keygen -t ed25519: Generate Ed25519 key (more secure)
  • ssh-keygen -p: Change passphrase

100. sudo - Execute Command as Another User

sudo executes a command as another user, typically as root.

Basic usage:

sudo command

Common options:

  • sudo -l: List allowed commands
  • sudo -i: Start a login shell as the target user
  • sudo -u username command: Run as specified user

FAQ: Common Linux Command Questions

What is the difference between sudo and su?

sudo lets you execute a single command with root privileges, while su switches your entire user session to another user (typically root). sudo is generally preferred as it:

  • Doesn't reveal the root password
  • Logs all commands executed
  • Gives more granular control over who can run what commands
  • Minimizes the time spent with elevated privileges

How do I find which process is using a specific port?

You can use the following command:

sudo lsof -i :port_number

Alternatively:

sudo netstat -tuln | grep port_number

How do I schedule tasks to run automatically?

Use the cron system:

  1. Edit your crontab with crontab -e
  2. Add entries in the format: minute hour day month weekday command

Example to run a script every day at 3 AM:

0 3 * * * /path/to/script.sh

How do I find which package provides a specific command?

On Debian/Ubuntu:

dpkg -S command_name

On Red Hat/CentOS:

yum provides */command_name

How do I check disk space usage on Linux?

Use the df command to check disk space:

df -h

To find the largest directories in the current location:

du -h --max-depth=1 | sort -hr

Conclusion

Mastering these 100 essential Linux commands will significantly enhance your productivity and control over Linux systems. Whether you're managing servers, developing applications, or simply exploring Linux as a user, these commands provide the foundation for efficient system administration and usage.

Remember that Linux commands often have many more options than we've covered here. The man pages (man command_name) are your best friend for discovering all available options. Practice these commands regularly in a safe environment, and you'll quickly become proficient in Linux command-line operations.

For more in-depth information on Linux commands and system administration, consider exploring official Linux documentation, distribution-specific resources, and community forums where you can learn from experienced Linux users and administrators.

Are you ready to take your Linux skills to the next level? Start by practicing these commands in your own Linux environment today!

Shaik Vahid
Shaik Vahid

DevOps Engg

A metallurgist by education, tech enthusiast by passion. I've transformed my curiosity into expertise in web hosting, DevOps, and web development. With hands-on experience in Linux administration, cPanel, WordPress, and Node.js.

View more posts by Shaik Vahid