Common Linux Commands

The following list describes some of the most useful and popular Linux commands. This is not a comprehensive list by any means, but this should give you a quick reference to some of the common Linux commands. Bookmark this article for your future reference.
Consult the man page for each command to learn about additional arguments and details of operation.


CommandDescription
cat [filename]Display file’s contents to the standard output device (usually your monitor).
cd /directorypathChange to directory.
chmod [options] mode filenameChange a file’s permissions.
chown [options] filenameChange who owns a file.
clearClear a command line screen/window for a fresh start.
cp [options] source destinationCopy files and directories.
date [options]Display or set the system date and time.
df [options]Display used and available disk space.
du [options]Show how much space each file takes up.
file [options] filenameDetermine what type of data is within a file.
find [pathname] [expression]Search for files matching a provided pattern.
grep [options] pattern [filesname]Search files or output for a particular pattern.
kill [options] pidStop a process. If the process refuses to stop, use kill -9 pid.
less [options] [filename]View the contents of a file one page at a time.
ln [options] source [destination]Create a shortcut.
locate filenameSearch a copy of your filesystem for the specified filename.
lpr [options]Send a print job.
ls [options]List directory contents.
man [command]Display the help information for the specified command.
mkdir [options] directoryCreate a new directory.
mv [options] source destinationRename or move file(s) or directories.
passwd [name [password]]Change the password or allow (for the system administrator) to change any password.
ps [options]Display a snapshot of the currently running processes.
pwdDisplay the pathname for the current directory.
rm [options] directoryRemove (delete) file(s) and/or directories.
rmdir [options] directoryDelete empty directories.
ssh [options] user@machineRemotely log in to another Linux machine, over the network. Leave an ssh session by typing exit.
su [options] [user [arguments]]Switch to another user account.
tail [options] [filename]Display the last n lines of a file (the default is 10).
tar [options] filenameStore and extract files from a tarfile (.tar) or tarball (.tar.gz or .tgz).
topDisplays the resources being used on your system. Press q to exit.
touch filenameCreate an empty file with the specified name.
who [options]Display who is logged on.


Additional References
Top 10 Best Cheat Sheets and Tutorials for Linux / UNIX Commands

No comments:

Post a Comment