A selection of Linux commands
There are a large number of Linux commands to control your system. We have put together a small overview of the most common Linux & Unix commands that you can use for all Linux distributions.
Before you start looking at the most commonly used Linux commands, you should have a Terminal boot. In most Linux distributions one uses for this purpose Ctrl + Alt + T. If that doesn't work, search for "Terminal" in your application window.
File and directory commands
Command | Description |
---|---|
ls | Listing of directories (show contents of a directory) |
cd | Change directory |
cp | Copy a file or directory |
mv | Move or rename a file |
chmod | Change access rights of a file or directory |
chown | Change owner and group of a file or directory |
dd | Copy data block by block, clone, delete, create images, and much more... |
diff | Comparing the contents of two files line by line |
df | Show free space of all mounted drives |
you | Display memory consumption of a directory |
grep | Search files |
lsof | Open files display |
mount | Mount file system |
pwd | Displays the current working directory |
umount | Unmount file system |
mkdir | Create a directory / folder |
rm | Delete files and directories |
rmdir | Delete a directory |
rsync | Data synchronization / data transmission |
ftp | Start FTP |
sftp | Start SFTP |
scp | secure data transfer |
shred | Securely delete data |
File Search
Command | Description |
---|---|
find | Search files by date, size, change, name and pattern. |
grep | Search text within a file or output |
locate | Quick search of files by means of locatedb database |
whereis | Searching programs in predefined directories |
which | Locates a program which is located in the PATH |
Pack and unpack (compress) file
Command | Description |
---|---|
bunzip2 | Decompresses bz2 files |
bzip2 | Compresses files in bz2 format |
compress | Compresses files |
gunzip | Decompresses gz files |
gzip | Compresses files in gz format |
tar | Create tar archives |
uncompress | Decompresses files |
unzip | Decompresses Zip files |
zip | Compresses files in Zip format |
System commands
Command | Description |
---|---|
free | Display utilization of the working memory |
uptime | Shows how long the system is running |
date | Displays the system date and time |
ps | Shows the status of a process |
pstree | Displays all processes in a tree view |
uname | Show system information |
top | Displays the processes running on the system "live |
kill | End a process immediately |
killall | Terminate multiple processes with a specific name |
clear | Clear the console screen |
man | System manual (manual or manpage) for a command, application or file (manual) |
reboot | Restart the system |
shutdown | Shut down the system |
wall | Send a message to all connected users |
which | Locate a command (show path to the command) |
Manage users and groups
Command | Description |
---|---|
chfn | Edit information of a user |
id | Display of user ID and group ID (identifier) |
last | Show the last logins by date and time |
login | User (re)login |
who | Show the users currently logged in to the system |
whoami | Display of the user currently being worked with |
passwd | Change password of a user |
su | Log in as admin, or SU + username change the user |
sudo | Run a command as admin |
useradd | Create a user |
userdel | Delete a user |
usermod | Change a user |
groupadd | Create a user group |
groupdel | Delete a user group |
groupmod | Change a user group |
Network commands
Command | Description |
---|---|
ping | Send data packets to an IP (to check the connection). |
traceroute | Track a data packet |
netstat | Lists all currently used ports |
nslookup | Name resolution |
dig | DNS lookup tool |
ifconfig | Status and configuration of the network interface |
Hardware commands
Command | Description |
---|---|
lscpu | Show CPU information |
lshw | Show hardware information |
lspci | Show PCI hardware information |
lsusb | Show USB hardware information |
Other commands
Command | Description |
---|---|
tar | Compress and decompress files |
zip | Compress Zip archives |
unzip | Decompress Zip archives |
head | Output of the first lines of a file |
tail | Output of the last lines of a file |
less | Scrollable display of a text file |
xargs | Convert standard input to command lines |
wget | Download files from the web, supports HTTP, HTTPS and FTP |
curl | Transfer files from or to a server |
ssh | Establish a secure connection to another system |
cal | Calls a simple calendar |