Professional Documents
Culture Documents
Linux Commands All Users Should Know
Linux Commands All Users Should Know
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
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
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