Thanks to visit codestin.com
Credit goes to www.scribd.com

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

Linux Commands Cheat Sheet

This document is a cheat sheet containing essential Linux commands categorized into various sections such as File & Directory Management, File Content & Editing, Permissions & Ownership, System Info, Networking, Package Management, File Compression & Archiving, User Management, and Other Useful Commands. Each category lists commands along with brief descriptions of their functions. It serves as a quick reference guide for users to efficiently navigate and manage Linux systems.

Uploaded by

dramsey2k
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)
40 views3 pages

Linux Commands Cheat Sheet

This document is a cheat sheet containing essential Linux commands categorized into various sections such as File & Directory Management, File Content & Editing, Permissions & Ownership, System Info, Networking, Package Management, File Compression & Archiving, User Management, and Other Useful Commands. Each category lists commands along with brief descriptions of their functions. It serves as a quick reference guide for users to efficiently navigate and manage Linux systems.

Uploaded by

dramsey2k
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

Essential Linux Commands Cheat Sheet

File & Directory Management

ls List files in a directory

cd Change directory

pwd Print current directory

mkdir Make a new directory

rm Remove files or directories

rmdir Remove empty directories

cp Copy files or directories

mv Move or rename files/directories

touch Create empty file

find Search for files

locate Quickly find files (uses a database)

File Content & Editing

cat View file content

less, more View file content page-by-page

head Show first lines of a file

tail Show last lines of a file

nano Simple text editor

vim Powerful text editor

echo Display text or write to file

Permissions & Ownership

chmod Change file permissions

chown Change file owner

ls -l View file permissions and ownership

System Info

uname -a System info

top, htop View running processes


Essential Linux Commands Cheat Sheet

ps aux See running processes

df -h Disk space usage

du -sh Size of directory/file

free -h Memory usage

uptime System uptime

whoami Current user

id User ID and groups

Networking

ping Test network connectivity

ifconfig / ip a View network interfaces

netstat -tuln Listening ports

ss -tuln Alternative to netstat

curl Make web requests

wget Download files from the internet

telnet Test network services

nc (netcat) Read/write over network (useful for CTFs)

Package Management (Debian/Ubuntu)

apt update Update package list

apt upgrade Upgrade installed packages

apt install Install package

apt remove Remove package

Package Management (RedHat/CentOS)

yum install / dnf install Install package

yum update Update packages

File Compression & Archiving

tar -czf file.tar.gz folder Create tar.gz archive


Essential Linux Commands Cheat Sheet

tar -xzf file.tar.gz Extract tar.gz archive

zip, unzip Zip/unzip files

gzip, gunzip Compress/decompress files

User Management

adduser / useradd Add a new user

passwd Change user password

deluser / userdel Delete a user

su Switch user

sudo Run command as root

Other Useful Commands

history Show previously run commands

clear Clear the terminal screen

man <command> Manual for a command

alias Create command shortcuts

sleep Delay execution

cron, crontab -e Schedule recurring tasks

You might also like