A
Aura Dev

Linux Commands

Essential Linux terminal commands.

File Operations

ls -la

List all files with details

cd <dir>

Change directory

pwd

Print working directory

mkdir <dir>

Create a new directory

rm -rf <dir>

Remove directory recursively

cp <src> <dest>

Copy file or directory

mv <src> <dest>

Move or rename file

touch <file>

Create an empty file

File Viewing

cat <file>

Display file contents

less <file>

View file contents page by page

head -n 10 <file>

View first 10 lines of a file

tail -f <file>

Follow file changes (useful for logs)

grep "pattern" <file>

Search for pattern in a file

wc -l <file>

Count lines in a file

System Info

top

Display Linux processes

htop

Interactive process viewer (if installed)

df -h

Show disk space usage

free -m

Show RAM usage in MB

uname -a

Show system information

uptime

Show how long the system has been running

whoami

Show current logged in user

Network

ping <host>

Ping a host to check connectivity

curl <url>

Transfer data from or to a server

wget <url>

Download files from the web

netstat -tuln

List listening ports

ip addr

Show IP addresses and network interfaces

nslookup <domain>

Query DNS for domain information

Permissions

chmod 755 <file>

Change file permissions

chown user:group <file>

Change file owner and group

sudo <cmd>

Execute command as superuser

su <user>

Switch user

passwd

Change password for current user

Archives

tar -czvf <file.tar.gz> <dir>

Create a compressed tar archive

tar -xzvf <file.tar.gz>

Extract a compressed tar archive

zip -r <file.zip> <dir>

Create a zip archive

unzip <file.zip>

Extract a zip archive

What are Linux Commands?

Linux commands are text-based instructions used to interact with the Linux operating system via the terminal or shell.

This reference guide helps developers quickly recall essential commands for file manipulation, process management, and system administration.

Sponsored LinkAdvertisement Space (728x90)