{"id":26655243,"url":"https://github.com/muntasirszn/linuxcommandscheatsheet","last_synced_at":"2025-03-25T06:00:00.442Z","repository":{"id":247945549,"uuid":"827308205","full_name":"MuntasirSZN/LinuxCommandsCheatSheet","owner":"MuntasirSZN","description":"A cheatsheet for linux learners.","archived":false,"fork":false,"pushed_at":"2024-07-28T06:08:42.000Z","size":2744,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-07-28T07:24:21.131Z","etag":null,"topics":["cheatsheet","commands-cheatsheet","linux","linux-shell"],"latest_commit_sha":null,"homepage":"https://muntasirmahmud.me/LinuxCommandsCheatSheet/","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MuntasirSZN.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-11T11:54:54.000Z","updated_at":"2024-07-28T07:24:22.288Z","dependencies_parsed_at":"2024-07-24T14:52:18.328Z","dependency_job_id":null,"html_url":"https://github.com/MuntasirSZN/LinuxCommandsCheatSheet","commit_stats":null,"previous_names":["muntasirszn/linuxcommandscheatsheet"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MuntasirSZN%2FLinuxCommandsCheatSheet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MuntasirSZN%2FLinuxCommandsCheatSheet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MuntasirSZN%2FLinuxCommandsCheatSheet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MuntasirSZN%2FLinuxCommandsCheatSheet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MuntasirSZN","download_url":"https://codeload.github.com/MuntasirSZN/LinuxCommandsCheatSheet/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245407775,"owners_count":20610234,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cheatsheet","commands-cheatsheet","linux","linux-shell"],"created_at":"2025-03-25T05:59:59.639Z","updated_at":"2025-03-25T06:00:00.391Z","avatar_url":"https://github.com/MuntasirSZN.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv style=\"text-align: center;\"\u003e\n\n# Linux Commands Cheat Sheet 🐧📚📚\n\n\u003c/div\u003e\n\n\u003cdiv style=\"text-align: center;\"\u003e\n    \u003cimg src=\"Label.jpeg\" width=\"50%\" alt=\"\"\u003e\n\u003c/div\u003e\n\n\u003cdiv style=\"text-align: center;\"\u003e\n\n# Why this repo❓\n\n\u003c/div\u003e\n\nA lot of people is learning linux, for development reasons. They sometimes forget the commands. To help them **memorize** the commands, I made this repo. This is my personal repo, where I keep all the commands I use. I hope this repo helps you too. I provided a short description with it, also usage and an example.**Remember**,these are bash commands.\n\n# Table of Contents\n\n- [Most Used Commands](#most-used-commands)\n  - [01.``ls``](#01ls)\n  - [02.``cd``](#02cd)\n  - [03.``pwd``](#03pwd)\n  - [04.``touch``](#04touch)\n  - [05.``mkdir``](#05mkdir)\n  - [06.``rm``](#06rm)\n  - [07.``cp``](#07cp)\n  - [08.``mv``](#08mv)\n  - [09.``cat``](#09cat)\n  - [10.``more``](#10more)\n  - [11. ``less``](#11-less)\n  - [12.``head``](#12head)\n  - [13.``tail``](#13tail)\n  - [14.``grep``](#14grep)\n  - [15.``find``](#15find)\n  - [16.``whereis``](#16whereis)\n  - [17.``which``](#17which)\n  - [18.``man``](#18man)\n- [Not that much used Commands](#not-that-much-used-commands)\n  - [1.``chmod``](#1chmod)\n  - [2.``chown``](#2chown)\n  - [3.``whoami``](#3whoami)\n  - [4.``date``](#4date)\n  - [5.``cal``](#5cal)\n  - [6.``clear``](#6clear)\n  - [7.``echo``](#7echo)\n  - [8.``uname``](#8uname)\n  - [9.``uptime``](#9uptime)\n  - [10.``w``](#10w)\n  - [11.``who``](#11who)\n  - [12.``ps``](#12ps)\n  - [13.``kill``](#13kill)\n  - [14.``killall``](#14killall)\n  - [15.``pkill``](#15pkill)\n  - [16.``pgrep``](#16pgrep)\n  - [17.``top``](#17top)\n  - [18.``htop``](#18htop)\n  - [19.``free``](#19free)\n  - [20.``df``](#20df)\n- [All in one chart](#all-in-one-chart)\n- [Contributing](#contributing)\n- [License](#license)\n- [Author](#author)\n- [Conclusion](#conclusion)\n\n# Most Used Commands\n\n## 01.``ls``\n\nThis command is used to list the files and directories in the current directory. You can either use ``ls`` or ``ls -l`` to list the files in long format. Or, you can use ``ls -a`` to list all files including hidden files. You can also use ``ls -lh`` to list the files in long format with human-readable file sizes. And, use ``ls -R`` to list all files in the subdirectories. And, use ``ls -t`` to list the files by last modified time. Also, use ``ls -S`` to list the files by file size. You can also specify the path after the ``ls`` command to list the files in that directory.\n\n### Usage\n\n```bash\nls\n```\n\n#### Output\n\n```bash\nDesktop  Documents  Downloads  Music  Pictures  Videos\n```\n\n## 02.``cd``\n\nThis command is used to change the directory. You can use ``cd`` to change to the home directory. Or, you can use ``cd ..`` to move to the parent directory. You can also use ``cd -`` to move to the previous directory. You can also specify the path after the ``cd`` command to move to that directory. Or,use ``cd ../..`` to move two directories down. You can use ``cd ~`` to move to the home directory. You can also use ``cd /`` to move to the root directory. You can also use ``cd `` then the directory path to move to that directory.\n\n### Usage\n\n```bash\ncd\n```\n\n#### Output\n\n```bash\n/home/username\n```\n\n## 03.``pwd``\n\nThis command is used to print the current working directory. You can use ``pwd`` to print the current working directory.\n\n### Usage\n\n```bash\npwd\n```\n\n#### Output\n\n```bash\n/home/username\n```\n\n## 04.``touch``\n\nThis command is used to create a new file. You can use ``touch`` then the file name to create a new file.\n\n### Usage\n\n```bash\ntouch file.txt\n```\n\n#### Output\n\n```bash\nfile.txt\n```\n\n## 05.``mkdir``\n\nThis command is used to create a new directory. You can use ``mkdir`` then the directory name to create a new directory.\n\n### Usage\n\n```bash\nmkdir directory\n```\n\n#### Output\n\n```bash\ndirectory\n```\n\n## 06.``rm``\n\nThis command is used to remove files or directories. You can use ``rm`` then the file name to remove a file. You can also use ``rm -r`` then the directory name to remove a directory. Or, ``rm -rf`` then the directory name to remove a directory forcefully. You can also use ``rm -i`` then the file name to remove a file interactively. You can append ``sudo`` before the ``rm`` command to remove a file or directory that requires root permission. Remember, the ``rm`` command is irreversible.\n\n### Usage\n\n```bash\nrm file.txt\n```\n\n#### Output\n\nIf you use the command ``ls`` then you will see the file is removed.\n\n## 07.``cp``\n\nThis command is used to copy files or directories. You can use ``cp`` then the source file name and the destination file name to copy a file. You can also use ``cp -r`` then the source directory name and the destination directory name to copy a directory. You can also use ``cp -i`` then the source file name and the destination file name to copy a file interactively. You can append ``sudo`` before the ``cp`` command to copy a file or directory that requires root permission.\n\n### Usage\n\n```bash\ncp file.txt file2.txt\n```\n\n#### Output\n\n```bash\nfile2.txt\n```\n\n### Usage Number 2\n\n```bash\ncp -r directory directory2\n```\n\n#### Output Number 2\n\n```bash\ndirectory2\n```\n\nYou will see the files are copied.\n\n## 08.``mv``\n\nThis command is used to move files or directories. You can use ``mv`` then the source file name and the destination file name to move a file. You can also use ``mv -i`` then the source file name and the destination file name to move a file interactively. You can append ``sudo`` before the ``mv`` command to move a file or directory that requires root permission.\n\n### Usage\n\n```bash\nmv file.txt directory\n```\n\n#### Output\n\n```bash\ndirectory/file.txt\n```\n\n## 09.``cat``\n\nThis command is used to display the contents of a file. You can use ``cat`` then the file name to display the contents of a file. You can also use ``cat -n`` then the file name to display the contents of a file with line numbers. You can also use ``cat -b`` then the file name to display the contents of a file with line numbers except for blank lines. You can also use ``cat -s`` then the file name to display the contents of a file with multiple blank lines compressed into a single blank line.\n\n### Usage\n\n```bash\ncat file.txt\n```\n\n#### Output\n\n```bash\nHello World\n```\n\nIf ``file.txt`` contains ``Hello World``, then the output will be ``Hello World``. If there is nothing,  then the output will be empty.\n\n## 10.``more``\n\nThis command is used to display the contents of a file one page at a time. You can use ``more`` then the file name to display the contents of a file one page at a time. You can use the ``space`` key to move to the next page. You can use the ``enter`` key to move to the next line. You can use the ``q`` key to quit the display. You can use the ``b`` key to move to the previous page.\n\n### Usage\n\n```bash\nmore file.txt\n```\n\n#### Output\n\n```bash\nHello World\n```\n\n## 11. ``less``\n\nThis command is used to display the contents of a file one page at a time. You can use ``less`` then the file name to display the contents of a file one page at a time. You can use the ``space`` key to move to the next page. You can use the ``enter`` key to move to the next line. You can use the ``q`` key to quit the display. You can use the ``b`` key to move to the previous page. You can use the ``/`` key to search for a pattern in the file. You can use the ``n`` key to move to the next occurrence of the pattern. You can use the ``N`` key to move to the previous occurrence of the pattern. This command is similar to the ``more`` command. But, it is mainly used if the file is so big that no text editor can handle it.\n\n### Usage\n\n```bash\nless file.txt\n```\n\n#### Output\n\n```bash\nHello World\n```\n\nIf ``file.txt`` contains ``Hello World``, then the output will be ``Hello World``. If there is nothing, then the output will be empty.\n\n## 12.``head``\n\nThis command is used to display the first few lines of a file. You can use ``head`` then the file name to display the first few lines of a file. You can also use ``head -n`` then the number of lines and the file name to display the first few lines of a file. You can also use ``head -c`` then the number of bytes and the file name to display the first few bytes of a file.\n\n### Usage\n\n```bash\nhead file.txt\n```\n\n#### Output\n\n```bash\nThis is the headline\n```\n\nIf ``file.txt`` contains ``This is the headline`` at the headline, then the output will be ``This is the headline``. If there is nothing, then the output will be empty.\n\n## 13.``tail``\n\nThis command is used to display the last few lines of a file. You can use ``tail`` then the file name to display the last few lines of a file. You can also use ``tail -n`` then the number of lines and the file name to display the last few lines of a file. You can also use ``tail -c`` then the number of bytes and the file name to display the last few bytes of a file. You can also use ``tail -f`` then the file name to display the last few lines of a file and keep the file open for new lines.\n\n### Usage\n\n```bash\ntail file.txt\n```\n\n#### Output\n\n```bash\nThis is the last line\n```\n\nIf ``file.txt`` contains ``This is the last line`` at the end, then the output will be ``This is the last line``. If there is nothing, then the output will be empty.\n\n## 14.``grep``\n\nThis command is used to search for a pattern in a file. You can use ``grep`` then the pattern and the file name to search for a pattern in a file. You can also use ``grep -i`` then the pattern and the file name to search for a pattern in a file case-insensitively. You can also use ``grep -v`` then the pattern and the file name to search for a pattern in a file inversely. You can also use ``grep -c`` then the pattern and the file name to search for a pattern in a file and display the count of the pattern. You can also use ``grep -n`` then the pattern and the file name to search for a pattern in a file and display the line numbers of the pattern. You can also use ``grep -l`` then the pattern and the file name to search for a pattern in a file and display the file names containing the pattern. You can also use ``grep -r`` then the pattern and the directory name to search for a pattern in a directory recursively.\n\n### Usage\n\n```bash\ngrep \"pattern\" file.txt\n```\n\n#### Output\n\n```bash\npattern\n```\n\nIf ``file.txt`` contains ``pattern`` 1 or more times, then the output will be ``pattern``. If there is nothing, then the output will be empty.\n\n## 15.``find``\n\nThis command is used to find files or directories. You can use ``find`` then the directory name to find files or directories in a directory. You can also use ``find -name`` then the file name to find files or directories with the specified name. You can also use ``find -iname`` then the file name to find files or directories with the specified name case-insensitively. You can also use ``find -type`` then the file type to find files or directories with the specified type. You can also use ``find -empty`` to find empty files or directories. You can also use ``find -size`` then the file size to find files or directories with the specified size. You can also use ``find -exec`` then the command to execute the command on the found files or directories.\n\n### Usage\n\n```bash\nfind directory\n```\n\n#### Output\n\n```bash\n\ndirectory\n```\n\nIf the directory exists, then the output will be the directory name. If there is nothing, then the output will be empty.\n\n## 16.``whereis``\n\nThis command is used to find the binary, source, and manual page files for a command. You can use ``whereis`` then the command name to find the binary, source, and manual page files for a command.\n\n### Usage\n\n```bash\nwhereis ls\n```\n\n#### Output\n\n```bash\nls: /bin/ls\n```\n\n## 17.``which``\n\nThis command is used to find the location of a command. You can use ``which`` then the command name to find the location of a command.\n\n### Usage\n\n```bash\nwhich ls\n```\n\n#### Output\n\n```bash\n/bin/ls\n```\n\n## 18.``man``\n\nThis command is used to display the manual page of a command. You can use ``man`` then the command name to display the manual page of a command. You can use the ``space`` key to move to the next page. You can use the ``enter`` key to move to the next line. You can use the ``q`` key to quit the display. You can use the ``/`` key to search for a pattern in the manual page. You can use the ``n`` key to move to the next occurrence of the pattern. You can use the ``N`` key to move to the previous occurrence of the pattern.\n\n### Usage\n\n```bash\nman brew\n```\n\n#### Output\n\n```bash\nBREW(1)                  Homebrew Manual                  BREW(1)\n\nNAME\n       brew - The Missing Package Manager for macOS\n\nSYNOPSIS\n        brew command [options] [formula]    \n        brew help [command]\n        brew home\n        brew --version\n        brew --prefix\n        brew --cache\n        brew --cellar\n        brew --repository\n        brew update\n        brew list [--full-name]\n        brew search [text|/text/]\n        brew install formula\n        brew uninstall formula\n        brew info [formula]\n        brew deps formula\n        brew uses formula\n        brew outdated\n        brew upgrade [formula]\n        brew pin formula\n        brew unpin formula\n        brew list [formula]\n        brew cleanup\n        brew doctor\n        brew missing\n        brew link formula\n        brew unlink formula\n        brew switch formula\n        brew list --versions formula\n        brew cat formula\n        brew edit formula\n        brew create [URL [--no-fetch]]\n        brew home formula\n        brew options formula\n        brew install formula\n        brew fetch [formula]\n        brew update\n        brew upgrade\n        brew uninstall formula\n        brew pin formula\n        brew unpin formula\n        brew tap user/repo\n        brew tap --repair\n        brew tap --list\n        brew tap --prune\n        brew tap --search\n        brew tap --list-official\n        brew tap --list-pinned\n        brew tap --list-unpinned\n        brew tap --list-versions\n        brew tap --list-pinned-versions\n        brew tap --list-unpinned-versions\n        brew tap --list-pinned-official\n        brew tap --list-unpinned-official\n        brew tap --list-pinned-user\n        brew tap --list-unpinned-user\n        brew tap --list-pinned-user-versions\n        brew tap --list-unpinned-user-versions\n        brew tap --list-pinned-user-official\n```\n\nAnd, it will show you a lot more. I am not going to show you the whole manual page. This manual page is for homebrew. If you want to see the manual page of a command, then use ``man`` then the command name.\n\n# Not that much used Commands\n\n## 1.``chmod``\n\nThis command is used to change the permissions of a file or directory. You can use ``chmod`` then the permissions and the file name to change the permissions of a file or directory. You can also use ``chmod -R`` then the permissions and the directory name to change the permissions of a directory recursively. You can also use ``chmod u+x`` then the file name to add execute permission to the owner of the file. You can also use ``chmod g+x`` then the file name to add execute permission to the group of the file. You can also use ``chmod o+x`` then the file name to add execute permission to others. You can also use ``chmod a+x`` then the file name to add execute permission to all. You can also use ``chmod u-x`` then the file name to remove execute permission from the owner of the file. You can also use ``chmod g-x`` then the file name to remove execute permission from the group of the file. You can also use ``chmod o-x`` then the file name to remove execute permission from others. You can also use ``chmod a-x`` then the file name to remove execute permission from all. You can also use ``chmod u=rwx`` then the file name to set read, write, and execute permissions for the owner of the file. You can also use ``chmod g=rwx`` then the file name to set read, write, and execute permissions for the group of the file. You can also use ``chmod o=rwx`` then the file name to set read, write, and execute permissions for others. You can also use ``chmod a=rwx`` then the file name to set read, write, and execute permissions for all. You can also use ``chmod 777`` then the file name to set read, write, and execute permissions for all. You can also use ``chmod 755`` then the file name to set read, write, and execute permissions for the owner and read and execute permissions for the group and others. You can also use ``chmod 644`` then the file name to set read and write permissions for the owner and read permissions for the group and others. You can also use ``chmod 600`` then the file name to set read and write permissions for the owner and no permissions for the group and others. You can also use ``chmod 666`` then the file name to set read and write permissions for all. You can also use `` chmod 444`` then the file name to set read permissions for all. You can also use ``chmod 400`` then the file name to set read permissions for the owner and no permissions for the group and others. You can also use ``chmod 200`` then the file name to set write permissions for the owner and no permissions for the group and others. You can also use ``chmod 100`` then the file name to set execute permissions for the owner and no permissions for the group and others. You can also use ``chmod 000`` then the file name to set no permissions for all.\n\n### Usage\n\n```bash\nchmod 777 file.txt\n```\n\n#### Output\n\n```bash\nfile.txt\n```\n\nIf you use the command ``ls -l`` then you will see the permissions are changed.\n\n## 2.``chown``\n\nThis command is used to change the owner of a file or directory. You can use ``chown`` then the owner name and the file name to change the owner of a file or directory. You can also use ``chown -R`` then the owner name and the directory name to change the owner of a directory recursively. You can also use ``chown owner:group`` then the owner name, group name, and the file name to change the owner and group of a file or directory. You can also use ``chown -R owner:group`` then the owner name, group name, and the directory name to change the owner and group of a directory recursively.\n\n### Usage\n\n```bash\nchown owner file.txt\n```\n\n#### Output\n\n```bash\n\nfile.txt\n```\n\nIf you use the command ``ls -l`` then you will see the owner is changed.\n\n## 3.``whoami``\n\nThis command is used to print the current user. You can use ``whoami`` to print the current user.\n\n### Usage\n\n```bash\nwhoami\n```\n\n#### Output\n\n```bash\nusername\n```\n\n## 4.``date``\n\nThis command is used to print the current date and time. You can use ``date`` to print the current date and time. The format will be ``Day, Date, Month, Year, Time, Timezone``.\n\n### Usage\n\n```bash\ndate\n```\n\n#### Output\n\n```bash\nSun 10 Oct 2021 10:10:10 PM IST\n```\n\n## 5.``cal``\n\nThis command is used to print the calendar of the current month. You can use ``cal`` to print the calendar of the current month.\n\n### Usage\n\n```bash\ncal\n```\n\n#### Output\n\n```bash\n    October 2021\nSu Mo Tu We Th Fr Sa\n                1  2  \n3  4  5  6  7   8  9\n10 11 12 13 14 15 16\n17 18 19 20 21 22 23\n24 25 26 27 28 29 30\n31\n```\n\n## 6.``clear``\n\nThis command is used to clear the terminal. You can use ``clear`` to clear the terminal. You can do ctrl+l to clear the terminal too.\n\n### Usage\n\n```bash\nclear\n```\n\n#### Output\n\n```bash\n\n```\n\nYou will see the terminal is cleared.\n\n## 7.``echo``\n\nThis command is used to print a message. You can use ``echo`` then the message to print a message. You can also use ``echo -e`` then the message to print a message with escape characters interpreted. You can also use ``echo -n`` then the message to print a message without a newline.\n\n### Usage\n\n```bash\necho \"Hello World\"\n```\n\n#### Output\n\n```bash\nHello World\n```\n\n## 8.``uname``\n\nThis command is used to print the system information. You can use ``uname`` to print the system information. You can also use ``uname -a`` to print all the system information. You can also use ``uname -s`` to print the system name. You can also use ``uname -n`` to print the network node hostname. You can also use ``uname -r`` to print the kernel release. You can also use ``uname -v`` to print the kernel version. You can also use ``uname -m`` to print the machine hardware name. You can also use ``uname -p`` to print the processor type. You can also use ``uname -i`` to print the hardware platform. You can also use ``uname -o`` to print the operating system.\n\n### Usage\n\n```bash\nuname\n```\n\n#### Output\n\n```bash\nLinux\n```\n\n## 9.``uptime``\n\nThis command is used to print the uptime of the system. You can use ``uptime`` to print the uptime of the system.\n\n### Usage\n\n```bash\nuptime\n```\n\n#### Output\n\n```bash\n10:10:10 up 10 days, 10:10, 10 users, load average: 1.10, 1.10, 1.10\n```\n\nIf the system is up for 10 days,10 hours,10 minutes, then the output will be ``10:10:10 up 10 days, 10:10, 10 users, load average: 1.10, 1.10, 1.10``. If there is nothing, then the output will be empty.\n\n## 10.``w``\n\nThis command is used to print the users who are currently logged in and what they are doing. You can use ``w`` to print the users who are currently logged in and what they are doing.\n\n### Usage\n\n```bash\nw\n```\n\n#### Output\n\n```bash\n10:10:10 up 10 days, 10:10, 10 users, load average: 1.10, 1.10, 1.10\nUSER     TTY      FROM              LOGIN@   IDLE   JCPU   PCPU WHAT\nusername tty1     :0               10:10    10:10  10:10  10:10 -bash\n```\n\nIf the user is logged in and is doing something, then the output will be the user's information. If there is nothing, then the output will be empty.\n\n## 11.``who``\n\nThis command is used to print the users who are currently logged in. You can use ``who`` to print the users who are currently logged in.\n\n### Usage\n\n```bash\nwho\n```\n\n#### Output\n\n```bash\nusername tty1 2021-10-10 10:10 (:0)\n```\n\nIf the user is logged in, then the output will be the user's information. If there is nothing, then the output will be empty.\n\n## 12.``ps``\n\nThis command is used to print the currently running processes. You can use ``ps`` to print the currently running processes. You can also use ``ps -e`` to print all the processes. You can also use ``ps -f`` to print the full-format listing. You can also use ``ps -l`` to print the long-format listing. You can also use ``ps -u`` then the username to print the processes of the user. You can also use ``ps -aux`` to print all the processes in full-format listing.\n\n### Usage\n\n```bash\nps\n```\n\n#### Output\n\n```bash\n  PID TTY          TIME CMD\n  123 tty1     00:00:00 bash\n```\n\nIf the process is running, then the output will be the process information. It will also show system running processes.\n\n## 13.``kill``\n\nThis command is used to kill a process. You can use ``kill`` then the process ID to kill a process. You can also use ``kill -9`` then the process ID to kill a process forcefully. You can also use ``kill -l`` to list all the signals.\n\n### Usage\n\n```bash\nkill 123\n```\n\n#### Output\n\n```bash\n\n```\n\nIf the process is killed, then the output will be empty.\n\n## 14.``killall``\n\nThis command is used to kill all processes by name. You can use ``killall`` then the process name to kill all processes by name. You can also use ``killall -9`` then the process name to kill all processes by name forcefully.\n\n### Usage\n\n```bash\nkillall bash\n```\n\n#### Output\n\n```bash\n\n```\n\nIf the process is killed, then the output will be empty.\n\n## 15.``pkill``\n\nThis command is used to kill a process by name. You can use ``pkill`` then the process name to kill a process by name. You can also use ``pkill -9`` then the process name to kill a process by name forcefully.\n\n### Usage\n\n```bash\npkill bash\n```\n\n#### Output\n\n```bash\n\n```\n\nIf the process is killed, then the output will be empty.\n\n## 16.``pgrep``\n\nThis command is used to find the process ID by name. You can use ``pgrep`` then the process name to find the process ID by name.\n\n### Usage\n\n```bash\npgrep bash\n```\n\n#### Output\n\n```bash\n123\n```\n\nIf the process is found, then the output will be the process ID. If there is nothing, then the output will be empty.\n\n## 17.``top``\n\nThis command is used to display the dynamic real-time view of a running system. You can use ``top`` to display the dynamic real-time view of a running system. You can use the ``q`` key to quit the display.\n\n### Usage\n\n```bash\ntop\n```\n\n#### Output\n\n```bash\ntop - 10:10:10 up 10 days, 10:10, 10 users, load average: 1.10, 1.10, 1.10\nTasks: 123 total, 1 running, 122 sleeping, 0 stopped, 0 zombie\n%Cpu(s): 10.0 us, 10.0 sy, 10.0 ni, 10.0 id, 10.0 wa, 10.0 hi, 10.0 si, 10.0 st\nMiB Mem : 1000.0 total, 100.0 free, 900.0 used, 100.0 buff/cache  \n\nPID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND\n123 username  20   0  100.0m  10.0m  10.0m S  10.0   1.0  10:10.10 bash\n```\n\nIf the system is running, then the output will be the system information. If there is nothing, then the output will be empty.\n\n## 18.``htop``\n\nThis command is used to display the dynamic real-time view of a running system. You can use ``htop`` to display the dynamic real-time view of a running system. You can use the ``q`` key to quit the display.\n\n### Usage\n\n```bash\nhtop\n```\n\n#### Output\n\n![htop](https://github.com/MuntasirSZN/LinuxCommandsCheatSheet/blob/main/htop.png?raw=true)\n\n## 19.``free``\n\nThis command is used to display the amount of free and used memory in the system. You can use ``free`` to display the amount of free and used memory in the system.\n\n### Usage\n\n```bash\nfree\n```\n\n#### Output\n\n```bash\n              total        used        free      shared  buff/cache   available\nMem:        1000.0       900.0       100.0        10.0       100.0       100.0\nSwap:       1000.0       900.0       100.0\n```\n\n## 20.``df``\n\nThis command is used to display the amount of disk space available on the file system. You can use ``df`` to display the amount of disk space available on the file system. You can also use ``df -h`` to display the amount of disk space available on the file system in human-readable format. You can also use ``df -T`` to display the amount of disk space available on the file system with the file system type.\n\n### Usage\n\n```bash\ndf\n```\n\n#### Output\n\n```bash\nFilesystem     1K-blocks     Used Available Use% Mounted on\nudev             1000000        0   1000000   0% /dev\ntmpfs            1000000      100    100000   1% /run\n/dev/sda1        1000000    10000    900000   1% /\ntmpfs            1000000      100    100000   1% /dev/shm\ntmpfs            1000000      100    100000   1% /run/lock\ntmpfs            1000000      100    100000   1% /sys/fs/cgroup\n/dev/sda2        1000000    10000    900000   1% /home\ntmpfs            1000000      100    100000   1% /run/user/1000\n```\n\n# All in one chart\n\n| Command     | Description                                                         | Usage                       |\n| ----------- | ------------------------------------------------------------------- | --------------------------- |\n| ``ls``      | List files and directories                                          | ``ls``                      |\n| ``cd``      | Change directory                                                    | ``cd``                      |\n| ``pwd``     | Print current working directory                                     | ``pwd``                     |\n| ``touch``   | Create a new file                                                   | ``touch file.txt``          |\n| ``mkdir``   | Create a new directory                                              | ``mkdir directory``         |\n| ``rm``      | Remove files or directories                                         | ``rm file.txt``             |\n| ``cp``      | Copy files or directories                                           | ``cp file.txt file2.txt``   |\n| ``mv``      | Move files or directories                                           | ``mv file.txt directory``   |\n| ``cat``     | Display the contents of a file                                      | ``cat file.txt``            |\n| ``more``    | Display the contents of a file one page at a time                   | ``more file.txt``           |\n| ``less``    | Display the contents of a file one page at a time                   | ``less file.txt``           |\n| ``head``    | Display the first few lines of a file                               | ``head file.txt``           |\n| ``tail``    | Display the last few lines of a file                                | ``tail file.txt``           |\n| ``grep``    | Search for a pattern in a file                                      | ``grep \"pattern\" file.txt`` |\n| ``find``    | Find files or directories                                           | ``find directory``          |\n| ``whereis`` | Find the binary, source, and manual page files for a command        | ``whereis ls``              |\n| ``which``   | Find the location of a command                                      | ``which ls``                |\n| ``man``     | Display the manual page of a command                                | ``man brew``                |\n| ``chmod``   | Change the permissions of a file or directory                       | ``chmod 777 file.txt``      |\n| ``chown``   | Change the owner of a file or directory                             | ``chown owner file.txt``    |\n| ``whoami``  | Print the current user                                              | ``whoami``                  |\n| ``date``    | Print the current date and time                                     | ``date``                    |\n| ``cal``     | Print the calendar of the current month                             | ``cal``                     |\n| ``clear``   | Clear the terminal                                                  | ``clear``                   |\n| ``echo``    | Print a message                                                     | ``echo \"Hello World\"``      |\n| ``uname``   | Print the system information                                        | ``uname``                   |\n| ``uptime``  | Print the uptime of the system                                      | ``uptime``                  |\n| ``w``       | Print the users who are currently logged in and what they are doing | ``w``                       |\n| ``who``     | Print the users who are currently logged in                         | ``who``                     |\n| ``ps``      | Print the currently running processes                               | ``ps``                      |\n| ``kill``    | Kill a process                                                      | ``kill 123``                |\n| ``killall`` | Kill all processes by name                                          | ``killall bash``            |\n| ``pkill``   | Kill a process by name                                              | ``pkill bash``              |\n| ``pgrep``   | Find the process ID by name                                         | ``pgrep bash``              |\n| ``top``     | Display the dynamic real-time view of a running system              | ``top``                     |\n| ``htop``    | Display the dynamic real-time view of a running system              | ``htop``                    |\n| ``free``    | Display the amount of free and used memory in the system            | ``free``                    |\n| ``df``      | Display the amount of disk space available on the file system       | ``df``                      |\n\n# Contributing\n\nIf you want to contribute to this repo, then you can fork this repo and make a pull request. I will review the pull request and merge it if it is good. You can also open an issue if you find any bugs or want to suggest something. I will try to fix the issue as soon as possible.# Contributing\n\nContributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**.\n\n1. Fork the Project\n2. Create your Feature Branch\n3. Commit your Changes\n4. Push to the Branch\n5. Open a Pull Request\n\n# License\n\nThis repo is licensed under the MIT license. See [LICENSE.md](LICENSE.md) for more details.\n\n# Author\n\nMuntasir Mahmud (Also known in GitHub as MuntasirSZN)\n\n# Conclusion\n\nI hope this repo helps you to memorize the linux commands. If you have any questions, then you can ask me in the issues section. I will try to answer your questions as soon as possible. If you want to contribute to this repo, then you can fork this repo and make a pull request. I will review the pull request and merge it if it is good. I hope this repo helps you. Thank you for reading this repo. Have a nice day. Goodbye.👋👋👋\n\n**And**, don't forget to give a star to this repo.⭐⭐⭐\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmuntasirszn%2Flinuxcommandscheatsheet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmuntasirszn%2Flinuxcommandscheatsheet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmuntasirszn%2Flinuxcommandscheatsheet/lists"}