SlideShare a Scribd company logo
File Commands System Commands
File Searching Commands
File Encryption and Compression
Linux Command Line
Cheatsheet
Make Tech Easier
Uncomplicating the complicated
ls - List the content of the current directory uname -a - Show system and kernel
ls -R - List the subdirectories recursively head -n1 /etc/issue - Show distribution
ls -a - List all the content, including hidden files mount - Show mounted filesystems
ls -l - List the content and its information date - Show system date
pwd - Output the current directory that you are in uptime - Show system uptime
cd folder1 – Change the working directory to folder1 whoami - Show your username
cd - Return to the $Home directory w - Display who is online
cd .. - Go up a directory man command - Show manual for command
cd - - Return to the previous directory
mount -o loop cdrom.iso /mnt/dir - Mount cdrom.iso at
/mnt/dircp source destination – Copy source to destination
cp -r source destination – Copy a folder recursively from
source to destination
cat /proc/partitions - Show all partitions registered on the
system
mv source destination - Move (or rename) a file from source to
destination
grep MemTotal /proc/meminfo - Show RAM total seen by the
system
rm file1 - Remove file1 grep "model name" /proc/cpuinfo - Show CPU(s) info
rm -f file1 - Remove file1 without prompt lspci -tv - Show PCI info
rm -r folder - Remove a folder and its content recursively lsusb -tv - Show USB info
mkdir foldername – Create a new folder foldername !! - Repeat the last command
rmdir foldername – Remove an empty folder exit – Log out of current session
file file1 – Show the file type of file1
cat file1 file2 – Concatenate file1 to file 2
cat > file1 – Concatenate standard input to file1 grep pattern files - Search for pattern in files
less file1 - View and paginate file1 grep -i - Case insensitive search
head file1 - Show first 10 lines of file1 grep -r - Recursive search
tail file1 - Show last 10 lines of file1 grep -v - Inverted search
chmod 777 file - Change file permission of file to 777 grep -o - Show matched part of file only
chown user:group file - Change ownership of file to user and
group group
locate file1 - Find file1
whereis command - Find binary/source /manual for command
ln -s source destination – Create a symbolic link from source to
destination
which app – Locate a command for the app
look string file1 - Display any lines in file1 which contain string
as a prefix.
find /dir/ -user name - Find files owned by name in dir
gpg -c file - Encrypt file
find /dir/ -mmin num - Find files modifed less than num
minutes ago in dirgpg file.gpg - Decrypt file.gpg
tar -cf archive.tar foo bar - Create archive.tar from files foo
and bar
find /dir/ -name name* - Find files starting with name in dir
tar -xf archive.tar - Extract all files from archive.tar.
Process Management
Keyboard Shortcuts
SSH
Disk Space
Package Installation
Do you like this cheat sheet?
tar -czf archive.tar.gz foo bar - Create archive.tar.gz from files
foo and bar, with Gzip compression
ps - Show snapshot of processes
tar -xzf archive.tar.gz - Extract a tar using Gzip top - Show real time processes
tar -cjf archive.tar.bz2 foo bar - Create archive.tar.bz2 from
files foo and bar, using Bzip2 compression.
kill pid - Kill process with id pid
pkill name - Kill process with name name
tar -xjf archive.tar.bz2 – Extract a tar using Bzip2 killall name - Kill all processes with names beginning name
gzip file1 – Compress file1 and rename it to file1.gz
gzip -d file1.gz – Decompress file1.gz
Ctrl + Shift + c - Copy a highlighted text
Ctrl + Shift + v – Paste a copied text
ssh $USER@$HOST – Connect to $Host as $USER Ctrl + z - Sleep program
ssh $USER@$HOST command - Run command on $HOST as
$USER
Ctrl + c – Stop current command
Ctrl + r – Start a search
ssh $USER@$HOST -p 1234 – Connect to $HOST as $USER
on port 1234
Ctrl + u – Cut from start of line
Ctrl + k – Cut to end of line
scp file1 $USER@$HOST:file1 – Secure copy file1 from local
machine to file1 at remote $HOST
Ctrl + a – Go to start of line
Ctrl + e – Go to end of line
scp $USER@$HOST:file1 file1– Secure copy file1 from remote
$HOST to file1 at local machine
scp -r foo $USER@$HOST:/bar – Secure copy the folder foo
from local machine to the folder bar at remote $HOST
df -h - Show free space on mounted filesystems
df -i - Show free inodes on mounted filesystems
du -h folder – Show file usage of each folder in folder
du -sh folder – Show the total file size of folder
dpkg -i package.deb - Install a deb package fdisk -l - Show disks partitions sizes and types (run as root)
rpm -Uvh package.rpm – Install a rpm package free – Show memory and swap usage
Visit MakeTechEasier.com for more useful tech tutorials, tips and tricks

More Related Content

What's hot (20)

PPT
Linux - Introductions to Linux Operating System
Vibrant Technologies & Computers
 
PPT
Nfs
tmavroidis
 
PDF
The Linux Command Cheat Sheet
Tola LENG
 
DOCX
linux file sysytem& input and output
MythiliA5
 
PDF
Basic linux commands
Shakeel Shafiq
 
PPT
Basic 50 linus command
MAGNA COLLEGE OF ENGINEERING
 
PPT
Linux command ppt
kalyanineve
 
PPTX
Resource Monitoring and management
Duressa Teshome
 
PDF
Lesson 2 Understanding Linux File System
Sadia Bashir
 
PPTX
Users and groups
Varnnit Jain
 
PPT
Storage Management in Linux OS.ppt
Rakesh Kadu
 
PPT
Active directory
deshvikas
 
PDF
Embedded Operating System - Linux
Emertxe Information Technologies Pvt Ltd
 
PPT
Linux
Kevin James
 
ODP
Linux Introduction (Commands)
anandvaidya
 
PPTX
Recon with Nmap
OWASP Delhi
 
PPTX
Linux ppt
lincy21
 
PDF
Linux Tutorial For Beginners | Linux Administration Tutorial | Linux Commands...
Edureka!
 
PDF
Linux File System
Anil Kumar Pugalia
 
Linux - Introductions to Linux Operating System
Vibrant Technologies & Computers
 
The Linux Command Cheat Sheet
Tola LENG
 
linux file sysytem& input and output
MythiliA5
 
Basic linux commands
Shakeel Shafiq
 
Basic 50 linus command
MAGNA COLLEGE OF ENGINEERING
 
Linux command ppt
kalyanineve
 
Resource Monitoring and management
Duressa Teshome
 
Lesson 2 Understanding Linux File System
Sadia Bashir
 
Users and groups
Varnnit Jain
 
Storage Management in Linux OS.ppt
Rakesh Kadu
 
Active directory
deshvikas
 
Embedded Operating System - Linux
Emertxe Information Technologies Pvt Ltd
 
Linux
Kevin James
 
Linux Introduction (Commands)
anandvaidya
 
Recon with Nmap
OWASP Delhi
 
Linux ppt
lincy21
 
Linux Tutorial For Beginners | Linux Administration Tutorial | Linux Commands...
Edureka!
 
Linux File System
Anil Kumar Pugalia
 

Similar to Linux command line (20)

PDF
3.1.a linux commands reference
Acácio Oliveira
 
PDF
Linux commands cheat sheet by linoxide.com
Stavros Skamagkis
 
PDF
Quick guide of the most common linux commands
Carlos Enrique
 
PDF
Linux cheat-sheet
Craig Cannon
 
PDF
Linux cheat-sheet
Zeeshan Rizvi
 
PDF
Linux Commandos Cheat
Alvaro Gomes
 
PDF
Unix / Linux Command Reference
Sumankumar Panchal
 
PPTX
Linux commands
shekhar70
 
PDF
Linux Basic Commands
Hanan Nmr
 
PDF
Termux commands-list
DhanushR24
 
PDF
Linux Cheat Sheet.pdf
roschahacker
 
DOCX
Really useful linux commands
Michael J Geiser
 
PDF
Linux cheat sheet
Pinaki Mahata Mukherjee
 
PDF
Commands
damlepramod
 
PDF
KALI-LINUX-COMMANDS.pdf.................
salmannawaz6566504
 
ODT
Terminal linux commands_ Fedora based
Navin Thapa
 
DOCX
archive A-Z linux
elahe salimi
 
TXT
An a z index of the bash commands
Ben Pope
 
PDF
Bash cheat sheet
MRATUNJAI TIWARI
 
PDF
Bash cheat sheet
Jogesh Rao
 
3.1.a linux commands reference
Acácio Oliveira
 
Linux commands cheat sheet by linoxide.com
Stavros Skamagkis
 
Quick guide of the most common linux commands
Carlos Enrique
 
Linux cheat-sheet
Craig Cannon
 
Linux cheat-sheet
Zeeshan Rizvi
 
Linux Commandos Cheat
Alvaro Gomes
 
Unix / Linux Command Reference
Sumankumar Panchal
 
Linux commands
shekhar70
 
Linux Basic Commands
Hanan Nmr
 
Termux commands-list
DhanushR24
 
Linux Cheat Sheet.pdf
roschahacker
 
Really useful linux commands
Michael J Geiser
 
Linux cheat sheet
Pinaki Mahata Mukherjee
 
Commands
damlepramod
 
KALI-LINUX-COMMANDS.pdf.................
salmannawaz6566504
 
Terminal linux commands_ Fedora based
Navin Thapa
 
archive A-Z linux
elahe salimi
 
An a z index of the bash commands
Ben Pope
 
Bash cheat sheet
MRATUNJAI TIWARI
 
Bash cheat sheet
Jogesh Rao
 
Ad

Recently uploaded (20)

PPTX
Simplifying and CounFounding in egime.pptx
Ryanto10
 
PPTX
ipv6 very very very very vvoverview.pptx
eyala75
 
PDF
Slides PDF: ZPE - QFS Eco Economic Epochs pdf
Steven McGee
 
PPTX
1.10-Ruta=1st Term------------------------------1st.pptx
zk7304860098
 
PDF
DORA - MobileOps & MORA - DORA for Mobile Applications
Willy ROUVRE
 
PDF
Azure Devops Introduction for CI/CD and agile
henrymails
 
PPTX
Birth-after-Previous-Caesarean-Birth (1).pptx
fermann1
 
PDF
123546568reb2024-Linux-remote-logging.pdf
lafinedelcinghiale
 
PDF
World Game (s) Great Redesign via ZPE - QFS pdf
Steven McGee
 
PPTX
InOffensive Security_cybersecurity2.pptx
wihib17507
 
DOCX
An_Operating_System by chidi kingsley wo
kingsleywokocha4
 
PPTX
Finally, My Best IPTV Provider That Understands Movie Lovers Experience IPTVG...
Rafael IPTV
 
PPTX
02 IoT Industry Applications and Solutions (1).pptx
abuizzaam
 
PDF
The Power and Impact of Promotion most useful
RajaBilal42
 
PDF
The AI Trust Gap: Consumer Attitudes to AI-Generated Content
Exploding Topics
 
PDF
GEO Strategy 2025: Complete Presentation Deck for AI-Powered Customer Acquisi...
Zam Man
 
PPTX
Internet Basics for class ix. Unit I. Describe
ASHUTOSHKUMAR1131
 
PPTX
Internet_of_Things_Presentation_KaifRahaman.pptx
kaifrahaman27593
 
PDF
Real Cost of Hiring a Shopify App Developer_ Budgeting Beyond Hourly Rates.pdf
CartCoders
 
PDF
APNIC's Role in the Pacific Islands, presented at Pacific IGF 2205
APNIC
 
Simplifying and CounFounding in egime.pptx
Ryanto10
 
ipv6 very very very very vvoverview.pptx
eyala75
 
Slides PDF: ZPE - QFS Eco Economic Epochs pdf
Steven McGee
 
1.10-Ruta=1st Term------------------------------1st.pptx
zk7304860098
 
DORA - MobileOps & MORA - DORA for Mobile Applications
Willy ROUVRE
 
Azure Devops Introduction for CI/CD and agile
henrymails
 
Birth-after-Previous-Caesarean-Birth (1).pptx
fermann1
 
123546568reb2024-Linux-remote-logging.pdf
lafinedelcinghiale
 
World Game (s) Great Redesign via ZPE - QFS pdf
Steven McGee
 
InOffensive Security_cybersecurity2.pptx
wihib17507
 
An_Operating_System by chidi kingsley wo
kingsleywokocha4
 
Finally, My Best IPTV Provider That Understands Movie Lovers Experience IPTVG...
Rafael IPTV
 
02 IoT Industry Applications and Solutions (1).pptx
abuizzaam
 
The Power and Impact of Promotion most useful
RajaBilal42
 
The AI Trust Gap: Consumer Attitudes to AI-Generated Content
Exploding Topics
 
GEO Strategy 2025: Complete Presentation Deck for AI-Powered Customer Acquisi...
Zam Man
 
Internet Basics for class ix. Unit I. Describe
ASHUTOSHKUMAR1131
 
Internet_of_Things_Presentation_KaifRahaman.pptx
kaifrahaman27593
 
Real Cost of Hiring a Shopify App Developer_ Budgeting Beyond Hourly Rates.pdf
CartCoders
 
APNIC's Role in the Pacific Islands, presented at Pacific IGF 2205
APNIC
 
Ad

Linux command line

  • 1. File Commands System Commands File Searching Commands File Encryption and Compression Linux Command Line Cheatsheet Make Tech Easier Uncomplicating the complicated ls - List the content of the current directory uname -a - Show system and kernel ls -R - List the subdirectories recursively head -n1 /etc/issue - Show distribution ls -a - List all the content, including hidden files mount - Show mounted filesystems ls -l - List the content and its information date - Show system date pwd - Output the current directory that you are in uptime - Show system uptime cd folder1 – Change the working directory to folder1 whoami - Show your username cd - Return to the $Home directory w - Display who is online cd .. - Go up a directory man command - Show manual for command cd - - Return to the previous directory mount -o loop cdrom.iso /mnt/dir - Mount cdrom.iso at /mnt/dircp source destination – Copy source to destination cp -r source destination – Copy a folder recursively from source to destination cat /proc/partitions - Show all partitions registered on the system mv source destination - Move (or rename) a file from source to destination grep MemTotal /proc/meminfo - Show RAM total seen by the system rm file1 - Remove file1 grep "model name" /proc/cpuinfo - Show CPU(s) info rm -f file1 - Remove file1 without prompt lspci -tv - Show PCI info rm -r folder - Remove a folder and its content recursively lsusb -tv - Show USB info mkdir foldername – Create a new folder foldername !! - Repeat the last command rmdir foldername – Remove an empty folder exit – Log out of current session file file1 – Show the file type of file1 cat file1 file2 – Concatenate file1 to file 2 cat > file1 – Concatenate standard input to file1 grep pattern files - Search for pattern in files less file1 - View and paginate file1 grep -i - Case insensitive search head file1 - Show first 10 lines of file1 grep -r - Recursive search tail file1 - Show last 10 lines of file1 grep -v - Inverted search chmod 777 file - Change file permission of file to 777 grep -o - Show matched part of file only chown user:group file - Change ownership of file to user and group group locate file1 - Find file1 whereis command - Find binary/source /manual for command ln -s source destination – Create a symbolic link from source to destination which app – Locate a command for the app look string file1 - Display any lines in file1 which contain string as a prefix. find /dir/ -user name - Find files owned by name in dir gpg -c file - Encrypt file find /dir/ -mmin num - Find files modifed less than num minutes ago in dirgpg file.gpg - Decrypt file.gpg tar -cf archive.tar foo bar - Create archive.tar from files foo and bar find /dir/ -name name* - Find files starting with name in dir tar -xf archive.tar - Extract all files from archive.tar.
  • 2. Process Management Keyboard Shortcuts SSH Disk Space Package Installation Do you like this cheat sheet? tar -czf archive.tar.gz foo bar - Create archive.tar.gz from files foo and bar, with Gzip compression ps - Show snapshot of processes tar -xzf archive.tar.gz - Extract a tar using Gzip top - Show real time processes tar -cjf archive.tar.bz2 foo bar - Create archive.tar.bz2 from files foo and bar, using Bzip2 compression. kill pid - Kill process with id pid pkill name - Kill process with name name tar -xjf archive.tar.bz2 – Extract a tar using Bzip2 killall name - Kill all processes with names beginning name gzip file1 – Compress file1 and rename it to file1.gz gzip -d file1.gz – Decompress file1.gz Ctrl + Shift + c - Copy a highlighted text Ctrl + Shift + v – Paste a copied text ssh $USER@$HOST – Connect to $Host as $USER Ctrl + z - Sleep program ssh $USER@$HOST command - Run command on $HOST as $USER Ctrl + c – Stop current command Ctrl + r – Start a search ssh $USER@$HOST -p 1234 – Connect to $HOST as $USER on port 1234 Ctrl + u – Cut from start of line Ctrl + k – Cut to end of line scp file1 $USER@$HOST:file1 – Secure copy file1 from local machine to file1 at remote $HOST Ctrl + a – Go to start of line Ctrl + e – Go to end of line scp $USER@$HOST:file1 file1– Secure copy file1 from remote $HOST to file1 at local machine scp -r foo $USER@$HOST:/bar – Secure copy the folder foo from local machine to the folder bar at remote $HOST df -h - Show free space on mounted filesystems df -i - Show free inodes on mounted filesystems du -h folder – Show file usage of each folder in folder du -sh folder – Show the total file size of folder dpkg -i package.deb - Install a deb package fdisk -l - Show disks partitions sizes and types (run as root) rpm -Uvh package.rpm – Install a rpm package free – Show memory and swap usage Visit MakeTechEasier.com for more useful tech tutorials, tips and tricks