Home » Linux » Linux Basics » Linux Commands Cheat Sheet

Linux Commands Cheat Sheet

A Linux commands cheat sheet is a concise and quick reference guide that provides a list of commonly used commands in the Linux command-line interface (CLI). It typically includes commands for navigating the file system, managing files and directories, viewing and editing files, obtaining system information, managing processes, handling users and permissions, and more.

The cheat sheet is a handy resource for both beginners and experienced Linux users who want a quick reminder of command syntax and options. It usually organises commands by categories and includes brief descriptions of their functionalities.

Navigation and File Management:

  1. ls – List files and directories.
  2. pwd – Print the current working directory.
  3. cd – Change directory.
    • cd directory_name
  4. cp – Copy files or directories.
    • cp source destination
  5. mv – Move or rename files or directories.
    • mv source destination
  6. rm – Remove files or directories.
    • rm file_name
    • rm -r directory_name (recursive)
  7. mkdir – Create a new directory.
    • mkdir directory_name
  8. touch – Create an empty file or update the access and modification times of a file.

File Viewing and Editing:

  1. cat – Concatenate and display the content of files.
  2. more / less – View the contents of a file one screen at a time.
    • more file_name
    • less file_name
  3. nano / vim – Text editors for creating or modifying files.
    • nano file_name
    • vim file_name

System Information:

  1. uname – Display system information.
    • uname -a
  2. df – Display disk space usage.
  3. free – Display amount of free and used memory in the system.
  4. top – Display and update information about the top processes.

Process Management:

  1. ps – Display information about processes.
    • ps aux
  2. kill – Terminate a process.
    • kill process_id
  3. pkill – Send a signal to a process based on its name.
    • pkill process_name

Users and Permissions:

  1. whoami – Display the current username.
  2. who – Display information about users who are currently logged in.
  3. chmod – Change file permissions.
    • chmod permissions file_name
  4. chown – Change file owner and group.
    • chown owner:group file_name

Package Management:

  1. apt – Advanced Package Tool for managing packages.
    • sudo apt update
    • sudo apt install package_name

This is just a basic list, and there are many more Linux commands and options available. You can use the man command followed by the command name to access the manual pages and get more information about a specific command. For example, man ls will provide details about the ls command.


Subscribe our Rurban Life YouTube Channel.. "Rural Life, Urban LifeStyle"

Leave a Comment