0% found this document useful (0 votes)
2 views

50 Linux commands

The document provides a comprehensive list of common command-line commands along with their functions and syntax. It covers file management, system monitoring, user management, and network commands. Each command is accompanied by a brief description and its usage format.
Copyright
© © All Rights Reserved
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

50 Linux commands

The document provides a comprehensive list of common command-line commands along with their functions and syntax. It covers file management, system monitoring, user management, and network commands. Each command is accompanied by a brief description and its usage format.
Copyright
© © All Rights Reserved
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd
You are on page 1/ 10

Command Function

ls Lists files and directories

cd Changes directory

pwd Prints the current directory

mkdir Creates a new directory

rmdir Removes an empty directory

rm Removes files or directories

cp Copies files or directories

Moves or renames files and


mv
directories

touch Creates an empty file

cat Displays file content

nano Opens a file in the Nano text editor

vim Opens a file in the Vim text editor


echo Prints text to the terminal

whoami Shows the current user

id Displays user and group IDs

chmod Changes file permissions

chown Changes file ownership

ps Shows running processes

top Displays system resource usage

htop Interactive process monitoring

kill Terminates a process

pkill Kills a process by name

grep Searches for patterns in text


find Searches for files and directories

locate Quickly finds files

df Displays disk usage

du Shows file/directory size

free Displays memory usage

uname Shows system information

uptime Displays system uptime

history Shows command history

clear Clears the terminal screen

tar Archives files

zip Compresses files into a zip

unzip Extracts zip files

scp Copies files over SSH


wget Downloads files from the internet

curl Transfers data from a URL

ssh Connects to a remote server

ping Checks network connectivity

traceroute Traces network path

netstat Displays network connections

ip Shows network interfaces and IPs

hostname Displays the system hostname

sudo Runs a command as superuser

useradd Creates a new user

passwd Changes a user password


groupadd Creates a new group

reboot Restarts the system


Syntax
ls [options] [directory]

cd [directory]

pwd

mkdir [directory_name]

rmdir [directory_name]

rm [options] [file/directory]

cp [options] [source] [destination]

mv [source] [destination]

touch [file_name]

cat [file_name]

nano [file_name]

vim [file_name]
echo [text]

whoami

id [options] [username]

chmod [permissions] [file_name]

chown [user:group] [file_name]

ps [options]

top

htop

kill [PID]

pkill [process_name]

grep [pattern] [file_name]


find [directory] [options]

locate [file_name]

df -h

du -sh [directory]

free -h

uname -a

uptime

history

clear

tar [options] [archive_name] [files]

zip [archive.zip] [files]

unzip [archive.zip]

scp [source] [user@host:destination]


wget [URL]

curl [URL]

ssh [user@host]

ping [host]

traceroute [host]

netstat -tulnp

ip a

hostname

sudo [command]

useradd [username]

passwd [username]
groupadd [groupname]

reboot

You might also like