0% found this document useful (0 votes)
10 views3 pages

Ubuntu Linux Commands Cheat Sheet

This document is a cheat sheet for Ubuntu Linux commands, organized into sections such as System Information, File and Directory Management, and Package Management. It provides essential commands for managing files, processes, users, permissions, networking, and archives. Each command is accompanied by a brief description of its function.

Uploaded by

teb.design
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)
10 views3 pages

Ubuntu Linux Commands Cheat Sheet

This document is a cheat sheet for Ubuntu Linux commands, organized into sections such as System Information, File and Directory Management, and Package Management. It provides essential commands for managing files, processes, users, permissions, networking, and archives. Each command is accompanied by a brief description of its function.

Uploaded by

teb.design
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/ 3

Ubuntu Linux Command Cheat Sheet

1. System Information

uname -a # Show kernel information


hostname # Show system hostname
top # Display running processes
htop # (Better version of top, may need to install)
uptime # How long the system has been running
df -h # Disk usage (human-readable)
free -h # RAM and swap usage
whoami # Current user

2. File and Directory Management

ls # List directory contents


ls -l # Long list format
cd <dir> # Change directory
pwd # Show current directory
mkdir <dir> # Make a new directory
rm <file> # Delete file
rm -r <dir> # Delete directory and contents
cp <source> <dest> # Copy file/directory
mv <source> <dest> # Move or rename
touch <file> # Create an empty file
find <dir> -name "file" # Find files

3. File Viewing and Editing

cat <file> # View file content


less <file> # View with scroll
nano <file> # Edit file (easy editor)
vim <file> # Edit file (advanced editor)
head <file> # First 10 lines
tail <file> # Last 10 lines

4. Package Management (APT)

sudo apt update # Update package lists


sudo apt upgrade # Upgrade installed packages
sudo apt install <package> # Install new package
Ubuntu Linux Command Cheat Sheet

sudo apt remove <package> # Remove package


sudo apt search <package> # Search for package
sudo apt autoremove # Remove unused packages

5. User Management

adduser <username> # Add a new user


deluser <username> # Delete a user
passwd <username> # Change user password
sudo # Run command as root

6. Permissions

chmod +x <file> # Make file executable


chmod 755 <file> # Change permissions
chown <user>:<group> <file># Change ownership

7. Networking

ip a # Show IP address info


ping <host> # Ping a host
ifconfig # Show network interfaces (older)
wget <url> # Download file from web
curl <url> # Transfer data from/to server

8. Process Management

ps aux # Show all running processes


kill <pid> # Kill a process
killall <name> # Kill by name

9. Disk and System Utilities

df -h # Disk space usage


du -sh <dir> # Directory size
mount # Show mounted drives
umount <device> # Unmount a device
Ubuntu Linux Command Cheat Sheet

10. Archives and Compression

tar -xvf file.tar # Extract .tar


tar -xzvf file.tar.gz # Extract .tar.gz
zip file.zip <file/dir> # Create zip
unzip file.zip # Extract zip

You might also like