{"id":25268294,"url":"https://github.com/abolfazl-younesi/linux-important-commands","last_synced_at":"2025-07-11T01:08:25.874Z","repository":{"id":276281368,"uuid":"928800844","full_name":"Abolfazl-Younesi/Linux-important-Commands","owner":"Abolfazl-Younesi","description":"This repository contains a comprehensive list of essential Linux commands categorized for easy reference. It is designed to help beginners and experienced users quickly find the commands for system administration, file management, networking, process control, and more. Feel free to contribute and expand this collection!","archived":false,"fork":false,"pushed_at":"2025-02-07T09:14:05.000Z","size":3,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-06T04:19:55.093Z","etag":null,"topics":["linux","linux-command-line-shortcuts","linux-commands","linux-commands-cheatsheet","linux-shell"],"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/Abolfazl-Younesi.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":"2025-02-07T09:08:49.000Z","updated_at":"2025-02-07T09:16:37.000Z","dependencies_parsed_at":"2025-02-07T10:23:42.334Z","dependency_job_id":"329a7403-d0ac-411f-9775-0954d19ebdd9","html_url":"https://github.com/Abolfazl-Younesi/Linux-important-Commands","commit_stats":null,"previous_names":["abolfazl-younesi/linux-important-commands"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Abolfazl-Younesi/Linux-important-Commands","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Abolfazl-Younesi%2FLinux-important-Commands","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Abolfazl-Younesi%2FLinux-important-Commands/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Abolfazl-Younesi%2FLinux-important-Commands/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Abolfazl-Younesi%2FLinux-important-Commands/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Abolfazl-Younesi","download_url":"https://codeload.github.com/Abolfazl-Younesi/Linux-important-Commands/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Abolfazl-Younesi%2FLinux-important-Commands/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264703045,"owners_count":23651885,"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":["linux","linux-command-line-shortcuts","linux-commands","linux-commands-cheatsheet","linux-shell"],"created_at":"2025-02-12T10:24:40.583Z","updated_at":"2025-07-11T01:08:25.849Z","avatar_url":"https://github.com/Abolfazl-Younesi.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# 📌 Essential Linux Commands\n\nA collection of important Linux commands is categorized for quick reference.\n\n## 🚀 System Information \u0026 Monitoring\n\n```bash\nuname -a           # Show system information\nhostname           # Display system hostname\nuptime             # Show system uptime\nwhoami             # Show current user\nwho                # List logged-in users\ntop                # Display running processes\nhtop               # Interactive process viewer (requires installation)\nps aux             # List all running processes\nfree -h            # Show memory usage\ndf -h              # Show disk space usage\ndu -sh *           # Show disk usage per directory\nvmstat 1           # Show system performance statistics\n```\n\n## 📂 File and Directory Management\n\n```bash\nls -l              # List files with details\ncd /path/to/dir    # Change directory\npwd                # Print current directory\nmkdir newdir       # Create a new directory\nrmdir mydir        # Remove an empty directory\nrm -rf mydir       # Delete a directory and its contents\ncp file1 file2     # Copy a file\nmv file1 file2     # Move/rename a file\nfind / -name \"file\"  # Find a file by name\nlocate filename    # Quickly find a file (requires `mlocate` package)\n```\n\n## ✏️ File Viewing \u0026 Editing\n\n```bash\ncat file           # Display file content\ntac file           # Display file content in reverse\nless file          # View large files page by page\nmore file          # Similar to less but limited scrolling\nnano file          # Edit a file in Nano editor\nvim file           # Open a file in Vim editor\nhead -n 10 file    # Show first 10 lines of a file\ntail -n 10 file    # Show last 10 lines of a file\ntail -f logfile    # View live updates of a log file\n```\n\n## 👤 User Management\n\n```bash\nwhoami             # Show current user\nid                 # Show user ID and group ID\nusers              # List logged-in users\ngroups username    # Show groups of a user\nsudo useradd newuser   # Add a new user\nsudo passwd newuser    # Set a password for the new user\nsudo usermod -aG sudo username  # Add user to sudo group\nsudo deluser username   # Delete a user\n```\n\n## 🔐 Permissions \u0026 Ownership\n\n```bash\nls -l              # Show file permissions\nchmod 755 file     # Change file permissions\nchmod -R 755 dir   # Change directory permissions recursively\nchown user:group file  # Change file ownership\nchown -R user:group dir  # Change directory ownership recursively\n```\n\n## 🌐 Networking \u0026 Internet\n\n```bash\nping google.com        # Check network connectivity\ncurl -I google.com     # Fetch headers from a website\nwget file-url          # Download a file\nnetstat -tulnp         # Show open network ports\nss -tulnp              # Modern alternative to netstat\nip a                  # Show IP addresses\nnslookup google.com   # Get DNS info\ntraceroute google.com # Trace the path to a website\n```\n\n## ⚙️ Process Management\n\n```bash\nps aux               # Show running processes\ntop                  # Monitor system processes\nhtop                 # Advanced process viewer (requires installation)\nkill PID             # Kill a process by its PID\nkillall processname  # Kill all processes with a specific name\npkill processname    # Kill processes by name\nbg                   # Resume a background job\nfg                   # Bring background job to foreground\njobs                 # Show background jobs\n```\n\n## 📦 Package Management\n\n### **Debian/Ubuntu (APT)**\n\n```bash\nsudo apt update          # Update package lists\nsudo apt upgrade -y      # Upgrade all packages\nsudo apt install package # Install a package\nsudo apt remove package  # Remove a package\nsudo apt autoremove -y   # Remove unused packages\n```\n\n### **RedHat/CentOS/Fedora (YUM/DNF)**\n\n```bash\nsudo yum update -y       # Update all packages (CentOS 7)\nsudo dnf upgrade -y      # Update all packages (Fedora, CentOS 8+)\nsudo yum install package # Install a package\nsudo dnf remove package  # Remove a package\n```\n\n### **Arch Linux (Pacman)**\n\n```bash\nsudo pacman -Syu        # Update all packages\nsudo pacman -S package  # Install a package\nsudo pacman -R package  # Remove a package\n```\n\n## 💾 Disk Management\n\n```bash\ndf -h                  # Show disk space usage\ndu -sh *               # Show space used by each directory\nmount /dev/sdb1 /mnt   # Mount a disk\numount /mnt           # Unmount a disk\nfdisk -l               # List partitions\nlsblk                  # List block devices\n```\n\n## 📦 Compression \u0026 Archiving\n\n```bash\ntar -cvf archive.tar dir  # Create a tar archive\ntar -xvf archive.tar      # Extract a tar archive\ntar -czvf archive.tar.gz dir  # Create a compressed tar.gz archive\ntar -xzvf archive.tar.gz  # Extract a tar.gz archive\nzip -r archive.zip dir    # Create a zip file\nunzip archive.zip         # Extract a zip file\n```\n\n## 🔄 System Shutdown \u0026 Reboot\n\n```bash\nshutdown -h now        # Shutdown the system immediately\nshutdown -r now        # Reboot the system immediately\nreboot                # Reboot system\npoweroff              # Power off system\n```\n\n## 📢 Contributing\n\nFeel free to fork this repo and submit pull requests with improvements or additional commands! 🚀\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabolfazl-younesi%2Flinux-important-commands","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabolfazl-younesi%2Flinux-important-commands","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabolfazl-younesi%2Flinux-important-commands/lists"}