Commands and Keywords that every Linux user MUST know Part 2
Here is the
list of keywords and phrases that every Linux
newbie should
learn or at least have on file Part 2 :
fmt
--
simple optimal text formatter.
Reformat each paragraph in the FILE(s), writing to standard
output.
fold
-- wrap
each input line to fit in specified width.
Wrap input lines in each FILE (standard input by default),
writing to
standard output.
format
--
Format a string in the style of sprintf.
This command generates a formatted string in the same way as
the ANSI C
sprintf procedure (it uses sprintf in its implementation). FormatString
indicates
how to format the result, using % conversion specifiers as in sprintf,
and the additional arguments, if any, provide values to be substituted
into the
result. The return value from format is the formatted string.
free
--
Display amount of free and used memory in the system.
free displays the total amount of free and used physical and
swap
memory in the system, as well as the buffers used by the kernel. The
shared memory col‐
umn should be ignored; it is obsolete.
fsck*
--
check and repair a Linux file system.
*it needs to be executed as SuperUser a.k.a root
fsck is used to check and optionally repair one or more
Linux file
systems.
ftp
--
Internet file transfer program.
Ftp is the user interface to the Internet standard File
Transfer
Protocol. The program allows a user to transfer files to and from a
remote network site.
gawk -- finds and replace text in a file.
Gawk is the GNU Project's implementation of the AWK
programming
language. It conforms to the definition of the language in the POSIX
1003.1 Standard.
getopts
--
parse utility options.
getopts utility will retrieve options and option-arguments
from a list
of parameters.
grep
--
print lines matching a pattern.
grep searches the named input FILEs (or standard input if no
files are
named, or if a single hyphen-minus (-) is given as file name) for lines
containing a
match to the given PATTERN. By default, grep prints the matching lines.
groups
--
display current group names.
The groups command displays the current group names or ID
values. If
the value does not have a corresponding entry in /etc/group, the value
will be
displayed as the numerical group value. The optional user parameter
will display the groups for the named user.
groupadd --
create a new group.
The groupadd command creates a new group account using the
values
specified on the command line plus the default values from the system.
The new group will
be entered into the system files as needed.
groupdel
--
delete a group.
The groupdel command modifies the system account files,
deleting all
entries that refer to group. The named group must exist.
You must manually check all file systems to insure that no files remain
with the named group as the file group ID.
groupmod
--
modify an existing group definition on the system.
The groupmod command modifies the definition of the
specified GROUP by
modifying the appropriate entry in the group database.
gzip/gunzip
-- compress/decompress files
Gzip reduces the size of the named files using Lempel-Ziv
coding
(LZ77). Whenever possible, each file is replaced by one with the
extension .gz, while
keeping the same ownership modes, access and modification times. (The
default extension is -gz for VMS, z for MSDOS, OS/2 FAT, Windows NT FAT
and Atari.)
If no files are specified, or if a file name is "-", the standard input
is compressed to the standard output. Gzip will only attempt to
compress regular
files. In particular, it will ignore symbolic links.
hash
--
remember or report utility locations.
The hash utility shall affect the way the current shell
environment
remembers the locations of utilities found as described in Command
Search and Execution
. Depending on the arguments specified, it shall add utility locations
to its list of remembered locations or it shall purge the contents of
the list. When
no arguments are specified, it shall report on the contents of the list.
head
--
output the first part of files.
Print the first 10 lines of each FILE to standard output.
With more
than one FILE, precede each with a header giving the file name. With no
FILE, or when
FILE is -, read standard input.
history
--
GNU History Library/ shows the terminal history.
Many programs read input from the user a line at a time. The
GNU
History library is able to keep track of those lines, associate
arbitrary data with each
line, and utilize information from previous lines in composing new ones.
hostname
--
show or set the system's host name.
Hostname is the program that is used to either set or
display the
current host, domain or node name of the system. These names are used
by many of the
networking programs to identify the machine. The domain name is also
used by NIS/YP.
id
-- print
real and effective user and group IDs.
Print user and group information for the specified USERNAME,
or (when
USERNAME omitted) for the current user.
if
-- "use"
a Perl module if a condition holds.
ifconfig*
--
configure a network interface.
*it needs to be executed as SuperUser a.k.a. root
Ifconfig is used to configure the kernel-resident network
interfaces.
It is used at boot time to set up interfaces as necessary. After that,
it is usu‐
ally only needed when debugging or when system tuning is needed.
If no arguments are given, ifconfig displays the status of the
currently active interfaces. If a single interface argument is given,
it displays the sta‐
tus of the given interface only; if a single -a argument is given, it
displays the status of all interfaces, even those that are down.
Otherwise, it con‐
figures an interface.
init*
--
process control initialization.
*it needs to be executed as SuperUser a.k.a root
Init is the parent of all processes. Its primary role is to
create
processes from a script stored in the file /etc/inittab . This
file
usually has entries which cause init to spawn gettys on each line that
users can log in. It also controls autonomous processes required by any
particular
system.
info
-- read
Info documents.
Read documentation in Info format.
install
--
copy files and set attributes.
This install program copies files (often just compiled) into
destination locations you choose. If you want to download and install a
ready-to-use package
on a GNU/Linux system, you should instead be using a package manager
like yum, emerge, packman or apt-get.
jobs
--
display status of jobs in the current session.
The jobs utility shall display the status of jobs that were
started in
the current shell environment.
join
-- join
lines of two files on a common field.
For each pair of input lines with identical join fields,
write a line
to standard output. The default join field is the first, delimited by
whitespace.
When FILE1 or FILE2 (not both) is -, read standard input.
kill
-- kill
a process.
The default signal for kill is TERM. Use -l or -L to list
available
signals. Particularly useful signals include HUP, INT, KILL, STOP,
CONT, and 0.
Alternate signals may be specified in three ways: -9 -SIGKILL -KILL.
Negative PID values may be used to choose whole process groups; see the
PGID column
in ps command output. A PID of -1 is special; it indicates all
processes except the kill process itself and init.
last
-- show listing of last logged in users.
Last searches back through the file /var/log/wtmp (or the
file
designated by the -f flag) and displays a list of all users logged in
(and out) since that
file was created. Names of users and tty's can be given, in which case
last will show only those entries matching the arguments. Names of ttys
can be
abbreviated, thus last 0 is the same as last tty0.
When last catches a SIGINT signal (generated by the interrupt key,
usually control-C) or a SIGQUIT signal (generated by the quit key,
usually control-\),
last will show how far it has searched through the file; in the case of
the SIGINT signal last will then terminate.
The pseudo user reboot logs in each time the system is rebooted. Thus
last reboot will show a log of all reboots since the log file was
created.
Lastb is the same as last, except that by default it shows a log of the
file /var/log/btmp, which contains all the bad login attempts.
less
--
opposite of more, output a file page by page with lines
numbering.
Less is a program similar to more, but which allows backward
movement
in the file as well as forward movement. Also, less does not have to
read the
entire input file before starting, so with large input files it starts
up faster than text editors like vi. Less uses termcap (or terminfo on
some
systems), so it can run on a variety of terminals. There is even
limited support for hardcopy terminals. (On a hardcopy terminal, lines
which should be
printed at the top of the screen are prefixed with a caret.)
Commands are based on both more and vi. Commands may be preceded by a
decimal number, called N in the descriptions below. The number is used
by some com‐
mands, as indicated.
ln
-- make
links between files.
In the 1st form, create a link to TARGET with the name
LINK_NAME. In
the 2nd form, create a link to TARGET in the current directory. In the
3rd and 4th
forms, create links to each TARGET in DIRECTORY. Create hard links by
default, symbolic links with --symbolic. When creating hard links, each
TARGET must
exist. Symbolic links can hold arbitrary text; if later resolved, a
relative link is interpreted in relation to its parent directory.
logname
--
print user´s login name.
logname prints the calling user's name, as found in a
system-maintained file (often `/var/run/utmp' or `/etc/utmp'), and
exits with a status of 0. If there is no entry for the calling
process, `logname' prints an error message and exits with a status of
1.
logout --
write utmp and wtmp entries. exits from shell.
look
--
display lines beginning with a given string (lists words that
start with certain letters).
The look utility displays any lines in file which contain
string as a
prefix. As look performs a binary search, the lines in file must be
sorted (where
sort(1) got the same options -d and/or -f that look is invoked with).
If file is not specified, the file /usr/share/dict/words is used, only
alphanumeric characters are compared and the case of alphabetic
characters is ignored.
lpc
-- line
printer control program.
lpc provides limited control over printer and class queues
provided by
CUPS. It can also be used to query the state of queues.
If no command is specified on the command-line, lpc will display a
prompt and accept commands from the standard input.
lpq -- show printer queue status.
lpq shows the current print queue status on the named
printer. Jobs
queued on the default destination will be shown if no printer or class
is specified on
the command-line.
lpr
-- print
files.
lpr submits files for printing. Files named on the command
line are
sent to the named printer (or the system default destination if no
destination is spec‐
ified). If no files are listed on the command-line, lpr reads the print
file from the standard input.
ls
-- list
directory contents.
List information about the FILEs (the current directory by
default).
Sort entries alphabetically.
m4
-- macro
processor.
Process macros in FILEs. If no FILE or if FILE is `-',
standard input
is read.
mail
-- send
and receive mail.
mail is an intelligent mail processing system which has a
command
syntax reminiscent of ed(1) with lines replaced by messages.
man
--
format and display the on-line manual pages.
man formats and displays the on-line manual pages. If you
specify
section, man only looks in that section of the manual. name is normally
the name of the
manual page, which is typically the name of a command, function, or
file. However, if name contains a slash (/) then man interprets it as a
file specifi‐
cation, so that you can do man ./foo.5 or even man /cd/foo/bar.1.gz.
md5sum --
compute and check MD5 message digest.
Print or check MD5 (128-bit) checksums. With no FILE, or
when FILE is
-, read standard input.
mesg
--
control write access to your terminal.
Mesg controls the access to your terminal by others. It's
typically
used to allow or disallow other users to write to your
terminal.
mkdir
--
creates new directory.
mkdir creates each directory NAME in the order given. It
reports
an error if NAME already exists, unless the `-p' option is given and
NAME is a directory.
mkfifo
--
make FIFOs (named pipes).
A "FIFO" is a special file type that permits independent
processes
to communicate. One process opens the FIFO file for writing, and
another for reading, after which data can flow as with the usual
anonymous pipe in shells or elsewhere.
mknod
--
make block or character special files.
Create the special file NAME of the given TYPE.
more
-- file
perusal filter for crt viewing.
More is a filter for paging through text one screenful at a
time. Users
should realize that less provides more
emulation and extensive enhancements.
mount
--
mount a file system.
All files accessible in a Unix system are arranged in one
big tree, the
file hierarchy, rooted at /. These files can be spread out over several
devices.
The mount command serves to attach the file system found on some device
to the big file tree. Conversely, the umount command will detach it
again.
mtools
--
utilities to access DOS disks in Unix.
Mtools is a public domain collection of tools to allow Unix
systems to
manipulate MS-DOS files: read, write, and move around files on an
MS-DOS filesystem
(typically a floppy disk). Where reasonable, each program attempts to
emulate the MS-DOS equivalent command. However, unnecessary
restrictions and oddi‐
ties of DOS are not emulated. For instance, it is possible to move
subdirectories from one subdirectory to another.
mv
-- move
(rename) files.
mv can move any type of file from one file system to another.
nice
-- run
a program with modified scheduling priority.
Run COMMAND with an adjusted niceness, which affects process
scheduling. With no COMMAND, print the current niceness. Nicenesses
range from -20 (most
favorable scheduling) to 19 (least favorable).
nl
-- number
lines of files.
nl writes each FILE (`-' means standard input), or standard
input if
none are given, to standard output, with line numbers added to some or
all of the lines
nohup
-- run
a command immune to hangups, with output to a non-tty.
nohup runs the given COMMAND with hangup signals ignored, so
that the
command can continue running in the background after you log out.
passwd
--
change user password.
The passwd command changes passwords for user accounts. A
normal user
may only change the password for his/her own account, while the
superuser may change
the password for any account. passwd also changes account information,
such as the full name of the user, the user´s login shell, or
his/her password
expiry date and interval.
paste
--
merge lines of files.
Write lines consisting of the sequentially corresponding
lines from
each FILE, separated by TABs, to standard output. With no FILE, or when
FILE is -,
read standard input.
pathchk
--
check whether file names are valid or portable.
ping
-- send
ICMP ECHO_REQUEST to network hosts.
ping uses the ICMP protocol's mandatory ECHO_REQUEST
datagram to elicit
an ICMP ECHO_RESPONSE from a host or gateway. ECHO_REQUEST datagrams
(``pings'')
have an IP and ICMP header, followed by a struct timeval and then an
arbitrary number of ``pad'' bytes used to fill out the packet.
pr
--
convert text files for printing.
pr writes each FILE (`-' means standard input), or standard
input if
none are given, to standard output, paginating and optionally
outputting in multicolumn format; optionally merges all FILEs, printing
all in parallel, one per column.
printenv
--
print all or part of environment.
printf
--
format and print data.
Due to shell aliases and built-in `printf' command, using an
unadorned `printf' interactively or in a script may get you different
functionality.
ps
--
report a snapshot of the current processes.
ps displays information about a selection of the active
processes. If
you want a repetitive update of the selection and the displayed
information, use top(htop)
instead.
pwd
-- print
name of current/working directory.
rcp
--
remote file copy.
Rcp copies files between machines. Each file or directory
argument is
either a remote file name of the form ``rname@rhost:path'', or a local
file name (con‐
taining no `:' characters, or a `/' before any `:'s).
read
--
read a line from standard input.
The read utility will read a single line from standard input.
readonly
-- set the readonly attribute for variables.
The variables whose names are specified shall be given the
readonly attribute. The values of variables with the readonly attribute
cannot be changed by
subsequent assignment, nor can those variables be unset by the unset
utility. If the name of a variable is followed by = word, then the
value of that vari‐
able shall be set to word.
For additional questions or comment please refer to our
FORUM