Monday, 22 February 2021

Linux command List

 Let's see the list of Linux commands which are commonly used. This list is helpful for beginners and professionals both.

CommandsDescription
aliasConverts complex commands into simpler ones.
bzip2 / bunzip2Compresses a file / Decompress a bzip2 file.
bzcat / bzmoreDisplays files compressed with bzip2.
calDisplays calendar.
catIt is a multi-function command.
cdChanges the current working directory.
chageSets an expiration date for a user account.
chgrpChanges group.
chmodChanges permission for a file or directory.
chownChanges the owner of a file or directory.
chshChanges the shell.
clearClears the terminal.
commCompares two streams or files.
cpCopies file content from one file to another file.
cutUsed to display the desired column from a file.
dateDisplays the current date.
dfChecks the disk space in the system.
echoPrints the typed word on the terminal.
exitExits from the current user group to the last group.
exportExports shell variables to other shells.
fileDisplays the type of file.
findFinds files for a particular search.
gpasswdTransfers group membership to another user.
grepFilters lines of text containing a certain string.
groupaddCreates a group.
groupdelPermanently removes a group.
groupmodChanges group name.
groupsDisplays the group name to which the current user belongs to.
gzip / gunzipCompresses a file / Decompress a gzip file.
headDisplays the first ten lines of a file.
historyDisplays older commands from the shell command history.
HISTSIZEDetermines the number of commands to be stored in the current environment.
HISTFILEDisplays the file that contains the history.
HISTFILESIZESets the number of commands kept in the history file.
idTells about the user's id in the system.
lessDisplays file content according to the width of the terminal.
locateSearches a file in the database.
lsLists all the files of a directory.
manDisplays the manual page for the specified command.
mkdirCreates directory.
moreDisplays one output screen at a time.
mvRenames directories or files.
odDisplays a file content in octal format.
passwdSet a password for a user group.
pwdDisplay the current working directory location.
PS1Change the prompt name in the terminal.
renameRenames more than one file at once.
rmRemoves a file.
rmdirRemoves a directory.
set -o noclobberPrevents file from getting overwritten.
set +o noclobberAllows overwriting in the existing file.
set -uDisplays undefined variables as an error.
set +uDisplays nothing for an undefined variable.
set -xDisplays shell expansion.
set +xDisables shell expansion.
sedPerforms editing in streams.
sleepWaits for the specified number of seconds.
sortsorts the content in alphabetical order.
suIt allows a user to run a shell as another user.
sudoIt allows a user to start a program with the credentials of another user.
tacDisplays file content in the opposite order.
tailDisplays the last ten lines of a file.
tarCompresses a directory.
teePuts stdin on stdout and then into a file.
timeDisplays time taken to execute a command.
touchIt creates an empty file.
trTranslates characters.
typeDisplays information about command type.
uniqSorts and display multi times repeating lines only once.
unsetRemoves a variable from a shell.
useraddAdds users.
userdelDeletes users.
usermodModifies the properties of a user.
viOpens vi editor to write a program.
wDisplays who is logged on and what are they doing.
wcCounts words, lines, and characters.
whoTells who is logged on the system.
whoamiTells the name of the user.
who am iDisplays the line pointing to your current session.
zcat / zmoreViews the files compressed with gzip.

No comments:

Post a Comment