60 Essential Linux Commands

From file management to system administration and network configuration, these Linux commands handle a broad range of activities. Comprehending and utilizing these commands is important for effective Linux system administration and operation.

File and Directory Management:

  1. ls - List files and directories in the current directory.

  2. cd - Change the current working directory.

  3. pwd - Print the current working directory path.

  4. mkdir - Create a new directory.

  5. rmdir - Remove an empty directory.

  6. rm - Remove files or directories.

  7. cp - Copy files or directories.

  8. mv - Move or rename files and directories.

  9. touch - Create an empty file or update the timestamp of an existing file.

  10. find - Search for files and directories.

  11. grep - Search for text patterns in files.

  12. cat - Display the contents of a file.

  13. more - Display file content page by page.

  14. less - Display file content with backward navigation.

  15. head - Display the beginning of a file.

  16. tail - Display the end of a file.

  17. ln - Create hard or symbolic links to files.

File Permissions:

  1. chmod - Change file permissions.

  2. chown - Change file ownership.

  3. chgrp - Change the group of a file.

User and Group Management:

  1. useradd - Add a new user.

  2. userdel - Delete a user.

  3. passwd - Change user password.

  4. groupadd - Add a new group.

  5. groupdel - Delete a group.

  6. usermod - Modify user properties.

  7. groups - Display group memberships.

  8. id - Display user and group IDs.

System Information:

  1. uname - Display system information.

  2. hostname - Display or set the system hostname.

  3. df - Display disk space usage.

  4. du - Display directory space usage.

  5. free - Display system memory usage.

Process Management:

  1. ps - List running processes.

  2. top - Display real-time system information.

  3. kill - Terminate processes.

  4. bg - Run processes in the background.

  5. fg - Bring background processes to the foreground.

  6. nohup - Run a command immune to hangups.

  7. shutdown - Shut down or restart the system.

File Compression and Archiving:

  1. tar - Archive files.

  2. gzip - Compress files using gzip.

  3. gunzip - Decompress gzip files.

  4. zip - Create compressed zip archives.

  5. unzip - Extract files from zip archives.

Network Configuration:

  1. ifconfig - Display and configure network interfaces.

  2. ping - Test network connectivity.

  3. ssh - Securely access remote systems.

  4. netstat - Display network statistics.

  5. route - Manage network routes.

Text Processing:

  1. sed - Stream editor for text manipulation.

  2. awk - Text processing language.

  3. cut - Remove sections from lines of files.

  4. sort - Sort lines of text files.

  5. wc - Count words, lines, and characters.

Package Management:

  1. apt - Package handling utility (Debian-based systems).

  2. yum - Package manager (Red Hat-based systems).

  3. dpkg - Debian package manager.

  4. rpm - Red Hat package manager.

File Transfer:

  1. scp - Securely copy files between systems.

These commands are fundamental for Linux users and system administrators.