Enhancing Skills

More than 90 Essential Commands Every Linux User Should Know

In this comprehensive guide, you will introduced to over 90 essential commands that every Linux user should be familiar with. From navigation to file management, text editing, networking, and system monitoring, these commands will help you master your Linux experience!


Basic Commands

  • ls: List directory contents. This is one of the first commands new users learn.
  • cd: Change directory.
  • pwd: Print working directory.
  • cp: Copy files and directories.
  • mv: Move or rename files and directories.
  • rm: Remove files or directories.
  • chmod: Change file permissions.
  • chown: Change file ownership.
  • history: Command History Management
  • wc: Print newline, word, and byte counts for each file
  • which: Executable file associated with a given command

File Viewing and Editing

  • cat: Concatenate and display file contents.
  • head: Display the first few lines of a file.
  • more: Display the contents of a file one screen at a time.
  • tail: Display the last few lines of a file.
  • nano/vi/vim: Text editors for creating and editing files.

Data Manipulation and filtering

  • awk: A Versatile Text Processing Tool: awk
  • comm: Compare two sorted files line by line.
  • cut: Extract sections from each line of input: cut
  • diff: Compare files line by line
  • grep: Search for a pattern in files or output.
  • join: Join lines of two files on a common field
  • paste: Merge lines of files
  • perl: Practical Extraction and Report Language
  • sed: Stream Editor for Filtering and Transforming Text
  • sort: Sort lines of text files
  • tr: Extract sections from each line of input
  • uniq: Report or filter out repeated lines in a file
  • xargs: Build and Execute Command Lines from Standard Input

Network Commands

  • ifconfig: Display network interfaces configurations.
  • iptables: Firewall configuration tool for Linux.
  • netstat: Network statistics, routing tables, and interface statistics.
  • ping: Send ICMP packets to network hosts to verify reachability.
  • ssh-keygen: Generate a new SSH key pair for authentication.
  • scp: Securely copy files between hosts using SCP.
  • sftp: Secure File Transfer Protocol, for transferring files between hosts.
  • ufw: Uncomplicated Firewall
  • nmcli: WiFi Signal Strength

Package Management

System Management

  • sudo: Execute a command with superuser (root) privileges.
  • sudo systemctl: System service manager to start, stop, and manage services.
  • uname: Print information about the current operating system.
  • ps: Display a snapshot of currently running processes.
  • kill: Send a signal to a process to terminate it.
  • killall: Send a signal to all processes matching a given name.
  • reboot: Reboot the system.
  • shutdown: Shutdown the system.
  • uptime: Display how long the current system session has been running.
  • last: Display the login history of users on the system.
  • who: Display who is currently logged in to the system.
  • whoami: Display the current user’s username.
  • passwd: Change the password for the current user.
  • usermod: Modify a user account.
  • useradd: Create a new user account.
  • userdel: Delete a user account.
  • groups: Display the groups that the current user belongs to.
  • sudo passwd root: Change the password for the root user.
  • chroot: Change root directory, allowing you to run a system as if it were its own separate system.

File and Disk Management

  • du: Estimate the disk usage of a directory and its subdirectories.
  • df: Display a summary of the amount of disk space used and available.
  • mount: Mount or unmount filesystems.
  • umount: Unmount a filesystem.
  • tar: Create, extract, and manage archives (compressed files).
  • gzip/gunzip: Compress or decompress files using gzip.
  • bzip2/bunzip2: Compress or decompress files using bzip2.
  • zcat: Display the contents of a compressed file, without extracting it.
  • fsck: Disk usage and file integrity.

Process Management

  • top: Display the full command line of each process.
  • htop: Graphical representation similar to a task manager.
  • vmstat: System virtual memory statistics.
  • iostat: System I/O statistics, disk, and processor activity.

Scheduling and Automation

  • cron: Schedule jobs (commands) to run automatically at specified times.
  • cron -e: Edit the crontab for the current user.
  • crontab -l: Display the crontab for the current user.
  • crontab -r: Remove all jobs from the crontab for the current user.
  • sudo crontab -e: Edit the system-wide crontab.

All crontab options on a sing page:

Miscellaneous

  • alias: Define shorthand commands for longer or frequently used commands.
  • curl: Transfer data or interact with servers using various protocols.
  • find: Search for files based on various criteria, such as size or date modified.
  • log rotation: Log Rotation in Linux
  • make: Build programs from source code, following instructions in a Makefile.
  • make clean: Remove temporary files created during compilation.
  • make install: Install the compiled program and its dependencies.
  • watch: Monitor command output at regular intervals
  • wget: Download files from the web.

Also see: Most Common and Important Files and Directories

Git Commands

  • git clone URL: Clone a Git repository from a remote server.
  • git pull: Update a local Git repository with changes from the remote repository.
  • git add: Add files to be included in the next commit.
  • git commit -m “commit message”: Commit changes to the Git repository.
  • git push: Push changes to the remote Git repository.
  • git checkout branch_name: Switch to a different branch in the Git repository.

Much more comprehensive detailes here:


These commands represent some of the most commonly used Linux commands. As your needs grow and you become more comfortable with the system, you’ll likely discover others that suit your specific use cases better!


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.