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

PPT
Vi editor in linux
PDF
Shell scripting
PDF
Course 102: Lecture 13: Regular Expressions
PDF
Linux Bash Shell Cheat Sheet for Beginners
PDF
The Linux Command Cheat Sheet
PDF
Linux basic commands with examples
PDF
Linux Tutorial For Beginners | Linux Administration Tutorial | Linux Commands...
PDF
Shell scripting
Vi editor in linux
Shell scripting
Course 102: Lecture 13: Regular Expressions
Linux Bash Shell Cheat Sheet for Beginners
The Linux Command Cheat Sheet
Linux basic commands with examples
Linux Tutorial For Beginners | Linux Administration Tutorial | Linux Commands...
Shell scripting

What's hot (20)

PPTX
Linux basic commands
PPT
Unix/Linux Basic Commands and Shell Script
PDF
Step by Step Restore rman to different host
PPTX
Bash Shell Scripting
PDF
Course 102: Lecture 5: File Handling Internals
PPT
Linux presentation
PDF
Linux cheat-sheet
PDF
JDBC: Gestion des bases de données en Java
PDF
MySQL Database Architectures - 2020-10
PPTX
Deep dive into React Portals
PPTX
CSS Positioning and Features of CSS3
PDF
Complete Guide for Linux shell programming
PDF
Chapitre 4 no sql
PDF
Survey of Percona Toolkit
PPTX
Command-Line 101
PDF
Course 102: Lecture 9: Input Output Internals
PPTX
Moving from SQL Server to MongoDB
PDF
File system
PPTX
Dos%20commands(1)
PPT
Customizing the look and-feel of DSpace
Linux basic commands
Unix/Linux Basic Commands and Shell Script
Step by Step Restore rman to different host
Bash Shell Scripting
Course 102: Lecture 5: File Handling Internals
Linux presentation
Linux cheat-sheet
JDBC: Gestion des bases de données en Java
MySQL Database Architectures - 2020-10
Deep dive into React Portals
CSS Positioning and Features of CSS3
Complete Guide for Linux shell programming
Chapitre 4 no sql
Survey of Percona Toolkit
Command-Line 101
Course 102: Lecture 9: Input Output Internals
Moving from SQL Server to MongoDB
File system
Dos%20commands(1)
Customizing the look and-feel of DSpace
Ad

Similar to Linux command line (20)

PDF
3.1.a linux commands reference
PDF
Linux commands cheat sheet by linoxide.com
PDF
Quick guide of the most common linux commands
PDF
Linux cheat-sheet
PDF
Linux Commandos Cheat
PDF
Unix / Linux Command Reference
PPTX
Linux commands
PDF
Linux Basic Commands
PDF
Termux commands-list
PDF
Linux Cheat Sheet.pdf
DOCX
Really useful linux commands
PDF
Linux cheat sheet
PDF
Commands
PDF
Linux Commands CheatSheet - PDF.pdf for engineer
PDF
KALI-LINUX-COMMANDS.pdf.................
ODT
Terminal linux commands_ Fedora based
DOCX
archive A-Z linux
TXT
An a z index of the bash commands
PDF
Bash cheat sheet
PDF
Bash cheat sheet
3.1.a linux commands reference
Linux commands cheat sheet by linoxide.com
Quick guide of the most common linux commands
Linux cheat-sheet
Linux Commandos Cheat
Unix / Linux Command Reference
Linux commands
Linux Basic Commands
Termux commands-list
Linux Cheat Sheet.pdf
Really useful linux commands
Linux cheat sheet
Commands
Linux Commands CheatSheet - PDF.pdf for engineer
KALI-LINUX-COMMANDS.pdf.................
Terminal linux commands_ Fedora based
archive A-Z linux
An a z index of the bash commands
Bash cheat sheet
Bash cheat sheet
Ad

Recently uploaded (20)

PPTX
Power Point - Lesson 3_2.pptx grad school presentation
PDF
Slides PDF The World Game (s) Eco Economic Epochs.pdf
PPTX
E -tech empowerment technologies PowerPoint
PPTX
Internet___Basics___Styled_ presentation
PDF
The Internet -By the Numbers, Sri Lanka Edition
PPTX
PptxGenJS_Demo_Chart_20250317130215833.pptx
PPTX
Introduction about ICD -10 and ICD11 on 5.8.25.pptx
PDF
Decoding a Decade: 10 Years of Applied CTI Discipline
PPTX
introduction about ICD -10 & ICD-11 ppt.pptx
PDF
Unit-1 introduction to cyber security discuss about how to secure a system
PDF
How to Ensure Data Integrity During Shopify Migration_ Best Practices for Sec...
PDF
Testing WebRTC applications at scale.pdf
PDF
APNIC Update, presented at PHNOG 2025 by Shane Hermoso
PDF
Best Practices for Testing and Debugging Shopify Third-Party API Integrations...
PPTX
522797556-Unit-2-Temperature-measurement-1-1.pptx
PPT
isotopes_sddsadsaadasdasdasdasdsa1213.ppt
PPTX
Module 1 - Cyber Law and Ethics 101.pptx
PDF
Automated vs Manual WooCommerce to Shopify Migration_ Pros & Cons.pdf
PDF
Introduction to the IoT system, how the IoT system works
PPTX
presentation_pfe-universite-molay-seltan.pptx
Power Point - Lesson 3_2.pptx grad school presentation
Slides PDF The World Game (s) Eco Economic Epochs.pdf
E -tech empowerment technologies PowerPoint
Internet___Basics___Styled_ presentation
The Internet -By the Numbers, Sri Lanka Edition
PptxGenJS_Demo_Chart_20250317130215833.pptx
Introduction about ICD -10 and ICD11 on 5.8.25.pptx
Decoding a Decade: 10 Years of Applied CTI Discipline
introduction about ICD -10 & ICD-11 ppt.pptx
Unit-1 introduction to cyber security discuss about how to secure a system
How to Ensure Data Integrity During Shopify Migration_ Best Practices for Sec...
Testing WebRTC applications at scale.pdf
APNIC Update, presented at PHNOG 2025 by Shane Hermoso
Best Practices for Testing and Debugging Shopify Third-Party API Integrations...
522797556-Unit-2-Temperature-measurement-1-1.pptx
isotopes_sddsadsaadasdasdasdasdsa1213.ppt
Module 1 - Cyber Law and Ethics 101.pptx
Automated vs Manual WooCommerce to Shopify Migration_ Pros & Cons.pdf
Introduction to the IoT system, how the IoT system works
presentation_pfe-universite-molay-seltan.pptx

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