Essential Linux Commands

I started using Linux in late 1990’s when there were few books around that explained the basics. One of my favorite hand guides back then was the One Page Linux Manual. It had lists of many basic commands that I needed to navigate the files system. Here’s a list of some of the most basic commands than any new users needs to get started using Linux divided into useful categories. Happy learning!

Basic Commands:

  • pwd: Print the current working directory.
  • ls: List files and directories.
  • cd: Change directory.
  • mkdir: Create a new directory.
  • rmdir: Remove an empty directory.
  • rm: Remove files or directories.
  • cp: Copy files or directories.
  • mv: Move or rename files or directories.
  • touch: Create an empty file or update the timestamp of an existing file.
  • cat: Concatenate and display file contents.

File Permissions:

  • chmod: Change file permissions.
  • chown: Change file owner and group.
  • ls -l: List files with detailed information including permissions.

Process Management:

  • ps: Display information about active processes.
  • top: Display real-time system usage and processes.
  • kill: Terminate a process.
  • jobs: List jobs that are running in the background.

System Information:

  • uname: Print system information.
  • df -h: Display disk space usage.
  • free -m: Display memory usage.
  • uptime: Display system uptime.

Networking:

  • ifconfig: Configure network interfaces.
  • ping: Send ICMP echo requests to test connectivity.
  • netstat: Display network connections, routing tables, and more.
  • ssh: Securely connect to a remote system.

Text Editing:

  • nano: Simple text editor.
  • gedit: Text editor for the Gnome environment
  • less: View file contents one page at a time.
  • grep: Search files for a text pattern.

Compression and Archiving:

  • tar: Archive files.
  • gzip: Compress files.
  • bzip2: Compress files with better compression.
  • unzip: Extract compressed files.

Package Management:

  • apt: Manage packages on Debian-based systems.
  • dnf: Package manager for Fedora.

This cheat sheet covers the most commonly used commands to help you get started with Linux.

Leave a Reply

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