You are on page 1of 1

Linux Commands All Users Should Know

Command Description Command Description Command Description Command Description

pwd Print working directory sudo <command> Elevate permissions wget <URL> Download file apt, yum, rpm, pacman Work with packages

ls -lah List directory contents df Show free space on disk uname -a Print system information passwd Change password

cd <dir> Change directory df


du Show disk usage history Show command history mount -t <type> <device> <dir> Mount device

head <file>
cat <file> Show file contents Show first ten lines man <command> Show manual page reboot Reboot system
<command> | head
Modify timestamp tail <file>
touch <file> Show last ten lines echo <argument> Print to terminal which <command> Show command path
Create File <command> | tail

cp <source> <destination> Copy file diff <file 1> <file 2> Show file differences hostname Show DNS name nano <file> Open file in nano text editor

mv <file> <destination> Move file tar Manage .tar files useradd <username> Add new user vim <file> Open file in Vim text editor

Change file/directory
mkdir <dir> Make directory chmod <perm> <file or dir> userdel <username> Delete existing user whatis <command> Show command description
permissions
Change file/directory
rmdir <dir> Remove empty directory chown <UID> <file or dir> file <file> Show file information alias <name>=<command> Set command alias
ownership

rm -r <file or dir> Remove file or directory ps List running processes wc <file> Count words, lines, bytes unalias <name> Remove command alias

List running processes in


locate <file> Show file location top whoami Show current user clear Clear terminal contents
real-time

find -name <file or dir> Show file or directory location kill <signal> <PID> Terminate process ip addr Show IP address exit Exit terminal session

grep <string> <file> Find string in file ping <host or URL> Check connectivity

You might also like