{"id":22650678,"url":"https://github.com/kausalyanp/linux-cheat-sheet","last_synced_at":"2025-07-25T20:16:17.077Z","repository":{"id":266034266,"uuid":"897168246","full_name":"kausalyanp/linux-cheat-sheet","owner":"kausalyanp","description":"This Cheat Sheet coontains most commnly and very uncommonly used linux commands.","archived":false,"fork":false,"pushed_at":"2024-12-02T07:35:12.000Z","size":20,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-03T20:50:29.958Z","etag":null,"topics":["cheat","cheat-sheet","cheatsheet","cheatsheets","commands","commands-cheatsheet","linux","linuxcommand","linuxcommands"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kausalyanp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-12-02T06:42:57.000Z","updated_at":"2024-12-02T07:40:33.000Z","dependencies_parsed_at":"2024-12-02T08:29:57.597Z","dependency_job_id":null,"html_url":"https://github.com/kausalyanp/linux-cheat-sheet","commit_stats":null,"previous_names":["kausalyanp/linux-cheat-sheet"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kausalyanp%2Flinux-cheat-sheet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kausalyanp%2Flinux-cheat-sheet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kausalyanp%2Flinux-cheat-sheet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kausalyanp%2Flinux-cheat-sheet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kausalyanp","download_url":"https://codeload.github.com/kausalyanp/linux-cheat-sheet/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246151563,"owners_count":20731624,"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":["cheat","cheat-sheet","cheatsheet","cheatsheets","commands","commands-cheatsheet","linux","linuxcommand","linuxcommands"],"created_at":"2024-12-09T08:36:38.860Z","updated_at":"2025-10-14T12:06:07.665Z","avatar_url":"https://github.com/kausalyanp.png","language":null,"readme":"# linux-cheat-sheet\nThis Cheat Sheet coontains most commnly and very uncommonly used linux commands.\n\n\u003ca name=\"top\"\u003e\u003c/a\u003e\n\n## Table of Contents:\n1. [File and Directory Management](#1-file-and-directory-management)\n2. [File Content Manipulation](#2-file-content-manipulation)\n3. [File Permissions](#3-file-permissions)\n4. [System Monitoring](#4-system-monitoring)\n5. [Network Commands](#5-network-commands)\n6. [Process Management](#6-process-management)\n7. [Archiving and Compression](#7-archiving-and-compression)\n8. [User Management](#8-user-management)\n9. [Package Management (Debian/Ubuntu)](#9-package-management-debianubuntu)\n10. [Others](#10-others)\n\n## 1. File and Directory Management\n* ls: Lists files and directories.\n  - Example: ls -l (detailed list view)\n    \n* cd: Changes the current directory.\n  - Example: cd /home/user\n    \n* pwd: Displays the current working directory.\n  - Example: pwd\n* mkdir: Creates a new directory.\n  - Example: mkdir new_folder\n* rmdir: Removes empty directories.\n  - Example: rmdir old_folder\n* rm: Deletes files or directories.\n  - Example: rm file.txt, rm -r folder (recursive delete)\n* cp: Copies files or directories.\n  - Example: cp file1.txt file2.txt\n* mv: Moves or renames files or directories.\n  - Example: mv file1.txt new_file.txt\n* touch: Creates a new empty file.\n  - Example: touch newfile.txt\n* find: Searches for files and directories.\n  - Example: find / -name file.txt\n* locate: Finds files and directories quickly using a database.\n  - Example: locate file.txt\n\n[Back to Top](#top)\n\n## 2. File Content Manipulation\n* cat: Displays the content of a file.\n    - Example: cat file.txt\n      \n* tac: Displays the content of a file in reverse.\n    - Example: tac file.txt\n      \n* less: Opens a file for viewing (scrollable).\n    - Example: less file.txt\n*  more: Views file content (less advanced than less).\n    - Example: more file.txt\n* head: Displays the first few lines of a file.\n    - Example: head -n 10 file.txt\n* tail: Displays the last few lines of a file.\n    - Example: tail -n 10 file.txt\n* nano: Opens a file in a simple text editor.\n    - Example: nano file.txt\n* vim: Opens a file in the Vim text editor.\n    - Example: vim file.txt\n* wc: Counts words, lines, and characters in a file.\n    - Example: wc file.txt\n\n[Back to Top](#top)\n\n## 3. File Permissions\n* chmod: Changes file or directory permissions.\n    - Example: chmod 755 file.txt\n      \n* chown: Changes file ownership.\n    - Example: chown user:group file.txt\n      \n* chgrp: Changes group ownership of a file.\n    - Example: chgrp group file.txt\n* umask: Sets default permissions for new files and directories.\n    - Example: umask 022\n\n[Back to Top](#top)\n\n## 4. System Monitoring\n* top: Displays real-time processes and resource usage.\n\n* htop: An interactive version of top (needs to be installed).\n\n*  ps: Lists running processes.\n    - Example: ps aux\n* df: Shows disk space usage.\n    - Example: df -h\n* du: Displays disk usage of a directory or file.\n    - Example: du -h folder\n* free: Displays memory usage.\n    - Example: free -h\n* uptime: Shows system uptime.\n    - Example: uptime\n* who: Displays logged-in users.\n    - Example: who\n* w: Shows who is logged in and what they are doing.\n    - Example: w\n\n[Back to Top](#top)\n\n## 5. Network Commands\n* ping: Tests network connectivity to a host.\n    - Example: ping google.com\n      \n* ifconfig: Displays or configures network interfaces.\n    - Example: ifconfig eth0\n  \n* ip: Configures network interfaces and routing (modern replacement for ifconfig).\n    - Example: ip addr\n* netstat: Displays network connections and statistics.\n    - Example: netstat -tuln\n* ss: Displays detailed network statistics (faster than netstat).\n    - Example: ss -tuln\n* wget: Downloads files from the internet.\n    - Example: wget http://example.com/file.txt\n* curl: Transfers data from a URL.\n    - Example: curl http://example.com\n\n[Back to Top](#top)\n\n## 6. Process Management\n* kill: Terminates a process using its PID.\n    - Example: kill 1234\n      \n* killall: Terminates all processes with a specific name.\n    - Example: killall firefox\n* jobs: Lists background jobs.\n    - Example: jobs\n* fg: Brings a background job to the foreground.\n    - Example: fg %1\n* bg: Resumes a background job.\n    - Example: bg %1\n\n[Back to Top](#top)\n\n## 7. Archiving and Compression\n* tar: Archives files into a tarball.\n    - Example: tar -cvf archive.tar files/\n      \n* gzip: Compresses files using the gzip algorithm.\n    - Example: gzip file.txt\n* gunzip: Decompresses gzip files.\n    - Example: gunzip file.txt.gz\n* zip: Compresses files into a zip archive.\n    - Example: zip archive.zip file.txt\n* unzip: Extracts files from a zip archive.\n    - Example: unzip archive.zip\n\n[Back to Top](#top)\n\n## 8. User Management\n* whoami: Displays the current logged-in user.\n    - Example: whoami\n      \n* id: Displays user ID, group ID, and other information.\n    - Example: id\n* adduser: Adds a new user.\n    - Example: sudo adduser username\n* passwd: Changes the password for a user.\n    - Example: passwd\n* usermod: Modifies a user account.\n    - Example: usermod -aG groupname username\n* deluser: Deletes a user account.\n    - Example: sudo deluser username\n\n[Back to Top](#top)\n \n## 9. Package Management (Debian/Ubuntu)\n* apt-get: Installs, upgrades, or removes packages.\n    - Example: sudo apt-get install package-name\n      \n* apt: A user-friendly alternative to apt-get.\n    - Example: sudo apt install package-name\n* dpkg: Installs or removes .deb packages.\n    - Example: sudo dpkg -i package.deb\n\n[Back to Top](#top)\n \n## 10. Others\n* echo: Displays text.\n    - Example: echo \"Hello, World!\"\n      \n* date: Shows or sets the system date and time.\n    - Example: date\n* cal: Displays a calendar.\n    - Example: cal\n* shutdown: Shuts down the system.\n    - Example: sudo shutdown now\n* reboot: Reboots the system.\n    - Example: sudo reboot\n* alias: Creates a shortcut for a command.\n    - Example: alias ll='ls -l'\n* clear: Clears the terminal screen.\n    - Example: clear\n\n[Back to Top](#top)\n\nThis repo is created by Kausalya N P\n\u003e\u003e Users can copy this for educational purpose.\n\n\n\n\n\n\n\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkausalyanp%2Flinux-cheat-sheet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkausalyanp%2Flinux-cheat-sheet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkausalyanp%2Flinux-cheat-sheet/lists"}