020 8090 9664
Map
  • Support
    • Raise a ticket
    • Call support
    • Network status
    • Support Hub
  • Login
    • Platform
  • HOW TO RAISE A SUPPORT TICKET
  • 020 8090 9664
  • Raise a Ticket
    Call Support
    Network Status
    Knowledge Base

    Nimbus
    • Managed Hosting
      • Hosting for WordPress
      • Magento
      • PHP Applications
      • Laravel Hosting
      • Ecommerce
      • Reseller Hosting
    • Servers
      • Server Hosting
      • VPS Servers
    • Platform
      • Agency Hosting Platform
      • NimCache Ultra
      • NimShield
      • NimWatch
    • Pricing
    • Sectors
      • I'm an agency
      • I'm a developer
      • I'm a freelancer
    • Resources
      • Blog
      • E-books
      • Reports
      • Webinars
      • Case Studies
    • Contact
  • Managed Hosting
    • Hosting for WordPress
    • Magento
    • PHP Applications
    • Laravel Hosting
    • Ecommerce
    • Reseller Hosting
  • Servers
    • Server Hosting
    • VPS Servers
  • Platform
    • Agency Hosting Platform
    • NimCache Ultra
    • NimShield
    • NimWatch
  • Pricing
  • Sectors
    • I'm an agency
    • I'm a developer
    • I'm a freelancer
  • Resources
    • Blog
    • E-books
    • Reports
    • Webinars
    • Case Studies
  • Contact
  • Home Blog The ultimate Linux command cheat sheet for developers
    The ultimate Linux command cheat sheet for developers
    Share article on Twitter
    Share article on LinkedIn
    Share article on Facebook

    The ultimate Linux command cheat sheet for developers

    By Louise Willoughby | 17 May 24

    1. Basic Unix Commands
    2. The ultimate Unix command guide for any operating system
    3. Navigation
    4. File Operations
    5. File Permissions
    6. System Information
    7. Networking
    8. Compression and Archiving
    9. Process Management
    10. Miscellaneous
    • Basic Unix Commands
    • The ultimate Unix command guide for any operating system
    • Navigation
    • File Operations
    • File Permissions
    • System Information
    • Networking
    • Compression and Archiving
    • Process Management
    • Miscellaneous

    Linux commands are a series of commands used to interact with the Linux operating system. Whether you want to remove files, compress files or check the uptime of your server, almost anything is possible with some basic Linux commands. The more commands you learn, the more tasks you can do. Let’s take a look at the new command line you’ll love using!

    Basic Unix Commands

    Let’s start with some basic commands. Whether you want to manage files, confirm current system status, or copy files using the CP command, with these basic unix commands, you can get a lot done!

     

    • ls: Lists directory contents.
    • cd: Changes the current directory.
    • pwd: Prints the current working directory.
    • mkdir: Creates a new directory.
    • touch: Creates a new file or updates the timestamp of an existing file.
    • rm: Removes files or directories.
    • cp: Copies files or directories.
    • mv: Moves files or directories.
    • cat: Concatenates and displays the content of files.
    • grep: Searches for patterns in files.
    • chmod: Changes file permissions.
    • chown: Changes file ownership.
    • sudo: Executes a command with superuser privileges.
    • man: Displays the manual pages of commands.
    • clear: Clears the terminal screen.

    The ultimate Unix command guide for any operating system

    Now that you know the basics, let’s dive a bit deeper. While the previous commands give you a head start, these allow you to control all the files on your system. We’d recommend saving this guide to keep it handy.

    Navigation

    • ls -l: Long listing format
    • ls -a: List all files including hidden files
    • ls -t: Sort files by modification time
    • ls -R: List subdirectories recursively
    • cd ..: Move to parent directory
    • cd –: Move to the previous directory
    • cd /path/to/directory: Change to a specific directory
    • rmdir: Remove directory (if empty)
    • rm -r: Remove directory and its contents recursively
    • rm -rf: Forcefully remove directory and its contents
    • cp -r: Copy directories recursively

    File Operations

    • less: View file content page by page
    • head: Display the beginning of a file
    • head -n 10 filename: Display the first 10 lines of a file
    • tail: Display the end of a file
    • tail -n 10 filename: Display the last 10 lines of a file
    • nano or vi: Text editors for creating or editing files
    • grep -i: Perform case-insensitive search
    • grep -r: Search recursively in directories
    • find: Search for files and directories
    • find /dir -name “filename*”: Search for files with a specific name
    • diff: Compare files line by line

    File Permissions

    • chmod 755 filename: Give read, write, execute permissions to owner, and read, execute permissions to group and others
    • chown user:group filename: Change owner and group of a file
    • chgrp: Change group ownership of a file or directory
    • setfacl: Set file access control lists

    System Information

    • top: Display and update sorted information about system processes
    • ps: Display information about active processes
    • ps -ef: Display all processes
    • df: Display disk space usage
    • df -h: Display sizes in a human-readable format
    • du: Display disk usage of files and directories
    • du -sh *: Display total size of each directory in the current directory
    • uptime: Display system uptime and load averages
    • free -m: Display amount of free and used memory in the system

    Networking

    • ping: Send ICMP ECHO_REQUEST to network hosts
    • ssh username@hostname: Connect to a remote host
    • scp file.txt username@hostname:/remote/directory/: Securely copy file to remote host
    • wget or curl: Download files from the internet
    • wget -O filename URL: Download file and save with a specific name

    Compression and Archiving

    • tar -cvf: Create a new “tar” archive
    • tar -xvf: Extract files from a “tar” archive
    • tar -zcvf: Create a compressed “tar” archive (gzip)
    • tar -zxvf: Extract files from a compressed “tar” archive (gzip)
    • gzip or gunzip: Compress or decompress files using gzip
    • gzip -9 filename: Compress files using maximum compression level
    • gunzip filename.gz: Decompress gzip file
    • zip or unzip: Package and compress (zip) or extract (unzip) files

    Process Management

    • kill: Terminate a process
    • kill -9 PID: Forcefully terminate a process by PID
    • killall: Terminate all processes by name

    Miscellaneous

    • date: Display or set the system date and time
    • history: Display the command history
    • history | grep keyword: Search command history for a specific keyword

     

    Thank you for checking out Nimbus’ guide to Linux Commands. If this list of Linux commands has helped, don’t forget to save them for future reference.

     

    Sources:

     

    The Knowledge Academy Unix Commands Cheat Sheet

    POSTED BY Louise Willoughby

    POSTED BY Louise Willoughby

    Nimbus

    The hosting platform for ambitious UK agencies and freelancers

    Facebook Instagram Twitter LinkedIn YouTube

    Products

    • Hosting
    • Platform
    • Dedicated Servers
    • Pricing

    Resources

    • Blog
    • Support Hub
    • Network Status
    • Raise a Ticket
    • Support

    Terms & Conditions

    • Cancellations & Downgrades
    • Complaints Advice
    • Cookie Policy
    • Customer Privacy Notice
    • Information Security Policy
    • Payment & Delivery Policy
    • Privacy Policy
    • Terms & Conditions

    Company

    • Team
    • Careers
    • Reviews
    • Contact
    • Ecommerce

    © 2025 Nimbus Hosting Ltd. All rights reserved. Registered in England, Company No. 07366355