📜  Linux命令列表

📅  最后修改于: 2020-12-07 07:31:02             🧑  作者: Mango

Linux命令列表

让我们看一下常用的Linux命令列表。此列表对初学者和专业人士都有帮助。

Commands Description
alias Converts complex commands into simpler ones.
bzip2 / bunzip2 Compresses a file / Decompress a bzip2 file.
bzcat / bzmore Displays files compressed with bzip2.
cal Displays calendar.
cat It is a multi-function command.
cd Changes the current working directory.
chage Sets an expiration date for a user account.
chgrp Changes group.
chmod Changes permission for a file or directory.
chown Changes the owner of a file or directory.
chsh Changes the shell.
clear Clears the terminal.
comm Compares two streams or files.
cp Copies file content from one file to another file.
cut Used to display the desired column from a file.
date Displays the current date.
df Checks the disk space in the system.
echo Prints the typed word on the terminal.
exit Exits from the current user group to the last group.
export Exports shell variables to other shells.
file Displays the type of file.
find Finds files for a particular search.
gpasswd Transfers group membership to another user.
grep Filters lines of text containing a certain string.
groupadd Creates a group.
groupdel Permanently removes a group.
groupmod Changes group name.
groups Displays the group name to which the current user belongs to.
gzip / gunzip Compresses a file / Decompress a gzip file.
head Displays the first ten lines of a file.
history Displays older commands from the shell command history.
HISTSIZE Determines the number of commands to be stored in the current environment.
HISTFILE Displays the file that contains the history.
HISTFILESIZE Sets the number of commands kept in the history file.
id Tells about the user’s id in the system.
less Displays file content according to the width of the terminal.
locate Searches a file in the database.
ls Lists all the files of a directory.
man Displays the manual page for the specified command.
mkdir Creates directory.
more Displays one output screen at a time.
mv Renames directories or files.
od Displays a file content in octal format.
passwd Set a password for a user group.
pwd Display the current working directory location.
PS1 Change the prompt name in the terminal.
rename Renames more than one file at once.
rm Removes a file.
rmdir Removes a directory.
set -o noclobber Prevents file from getting overwritten.
set +o noclobber Allows overwriting in the existing file.
set -u Displays undefined variables as an error.
set +u Displays nothing for an undefined variable.
set -x Displays shell expansion.
set +x Disables shell expansion.
sed Performs editing in streams.
sleep Waits for the specified number of seconds.
sort sorts the content in alphabetical order.
su It allows a user to run a shell as another user.
sudo It allows a user to start a program with the credentials of another user.
tac Displays file content in the opposite order.
tail Displays the last ten lines of a file.
tar Compresses a directory.
tee Puts stdin on stdout and then into a file.
time Displays time taken to execute a command.
touch It creates an empty file.
tr Translates characters.
type Displays information about command type.
uniq Sorts and display multi times repeating lines only once.
unset Removes a variable from a shell.
useradd Adds users.
userdel Deletes users.
usermod Modifies the properties of a user.
vi Opens vi editor to write a program.
w Displays who is logged on and what are they doing.
wc Counts words, lines, and characters.
who Tells who is logged on the system.
whoami Tells the name of the user.
who am i Displays the line pointing to your current session.
zcat / zmore Views the files compressed with gzip.