0% found this document useful (0 votes)
6 views2 pages

Linux Basic Commands CheatSheet

This document is a cheat sheet for basic Linux commands, organized into categories such as File & Directory Navigation, Management, Viewing & Searching, Permissions, System Information, Process Management, Networking, Archiving & Compression, User Management, and Package Management. Each category includes essential commands with brief descriptions of their functions. It serves as a quick reference guide for users to efficiently navigate and manage their Linux environment.

Uploaded by

rojivadiyapari
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views2 pages

Linux Basic Commands CheatSheet

This document is a cheat sheet for basic Linux commands, organized into categories such as File & Directory Navigation, Management, Viewing & Searching, Permissions, System Information, Process Management, Networking, Archiving & Compression, User Management, and Package Management. Each category includes essential commands with brief descriptions of their functions. It serves as a quick reference guide for users to efficiently navigate and manage their Linux environment.

Uploaded by

rojivadiyapari
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Linux Basic Commands Cheat Sheet

File & Directory Navigation


• pwd – Print working directory (shows current location)
• ls – List files and directories
• ls -l – List in long format
• ls -a – List including hidden files
• cd – Change directory
• cd .. – Go one level up
• cd ~ – Go to home directory

File & Directory Management


• mkdir – Create a new directory
• rmdir – Remove an empty directory
• rm -r – Remove directory and contents
• touch – Create an empty file
• cp file1 file2 – Copy file1 to file2
• mv file1 file2 – Move or rename file
• cat – Display file content
• nano / vi – Open file in text editor

Viewing & Searching


• more – View file page by page
• less – View file with navigation
• head -n 10 – Show first 10 lines
• tail -n 10 – Show last 10 lines
• grep 'word' file – Search for 'word' inside file

Permissions
• ls -l – Show file permissions
• chmod 755 – Change permissions
• chown user:group – Change file owner

System Information
• whoami – Show current user
• date – Show current date & time
• uptime – Show how long system is running
• uname -a – Show system details
• df -h – Show disk usage
• du -sh – Show size of a directory
• free -h – Show memory usage

Process Management
• ps – Show running processes
• top / htop – Monitor processes live
• kill – Kill a process by ID
• kill -9 – Force kill a process

Networking
• ping – Test connectivity
• ifconfig / ip a – Show network configuration
• curl – Fetch content from a URL
• wget – Download a file

Archiving & Compression


• tar -czf archive.tar.gz files/ – Create compressed archive
• tar -xzf archive.tar.gz – Extract archive
• zip file.zip file1 file2 – Create zip file
• unzip file.zip – Extract zip file

User Management
• who – Show logged-in users
• id – Show user ID and groups
• adduser – Add new user
• passwd – Change password

Package Management (Debian/Ubuntu)


• sudo apt update – Update package list
• sudo apt upgrade – Upgrade all packages
• sudo apt install – Install a package
• sudo apt remove – Remove a package

You might also like