Commands and Keywords that every Linux user MUST know Part 1
Here is the
list of keywords and phrases in alphabetical order that every Linux newbie should
learn or at least have on file :
alias --
define or display aliases.
The alias utility will create or redefine alias definitions or write
the values of existing alias definitions to standard output. An alias
definition provides a string value that shall replace a command name
when it is encountered.
aspell --
interactive spell checker.
aspell is a utility program that connects to the Aspell
library so that it can function as an ispell -a replacement, as an
independent spell checker, as a test utility to test out Aspell library
features, and as a utility for managing dictionaries used by the
library.
at --
execute commands at a later time.
The at utility will read commands from standard input and group them
together as an at-job, to be executed at a later time.
awk -- find
and replace text in file(s).
AWK is a language for processing files of text. A file is treated as a
sequence of records, and by default each line is a record. Each line is
broken up into a sequence of fields, so we can think of the first word
in a line as the first field, the second word as the second field, and
so on. An AWK program is of a sequence of pattern-action statements.
AWK reads the input a line at a time. A line is scanned for each
pattern in the program, and for each pattern that matches, the
associated action is executed.
basename --
strip directory and suffix from filenames.
If SUFFIX is specified and is identical to the end of NAME, it is
removed from NAME as well. Note that since trailing slashes
are removed prior to suffix matching, SUFFIX will do nothing if it
contains slashes. `basename' prints the result on standard
output.
bg -- run
jobs in the background.
Using bg to place a job into the background will cause its process ID
to become "known in the current shell execution environment",
as if it had been started as an
asynchronous list.
break --
exit from for, while, or until loop.
The break utility shall exit from the smallest enclosing for,
while, or until loop, if any; or from the nth enclosing loop if n is
specified. The value of n is an
unsigned decimal integer greater than or equal to 1.
bzip2/bunzip2
-- bzip2, bunzip2 - a block-sorting file compressor.
bzip2 compresses files using the Burrows-Wheeler block
sorting text compression algorithm, and Huffman coding.
Compression is generally considerably better than that achieved by more
conventional LZ77/LZ78-based compressors, and approaches the
performance of the PPM family of statistical compressors.
bzip2recover
-- recovers data from damaged bzip2 files.
cal --
displays a calendar.
A single parameter specifies the year (1 - 9999) to be displayed; note
the year must be fully specified: “cal 89” will not
display a calendar for 1989. Two parameters denote the month
(1 - 12) and year. Three parameters denote the day (1-31),
month and year, and the day will be highlighted if the calendar is
displayed on a terminal. If no parameters are specified, the
current month's calendar is displayed.
case --
Evaluate one of several scripts, depending on a given value.
The case command matches string against each of the patList arguments
in order. Each patList argument is a list of one or more patterns. If
any of these
patterns matches string then case evaluates the following body argument
by passing it recursively to the Tcl interpreter and returns the result
of that
evaluation. Each patList argument consists of a single pattern or list
of patterns. Each pattern may contain any of the wild-cards described
under string
match. If a patList argument is default, the corresponding body will be
evaluated if no patList matches string. If no patList argument matches
string and
no default is given, then the case command returns an empty string.
cat -- reads
the text of one or more files.
cd -- change
current directory.
cdrecord --
record audio or data Compact Disks or Digital Versatile Disks from a
master.
Cdrecord is completely based on SCSI commands but this is no problem as
all CD/DVD/BluRay writers ever made use SCSI commands for the
communication. Even
ATAPI drives are just SCSI drives that inherently use the ATA packet
interface as SCSI command transport layer build into the IDE (ATA)
transport. You may
need to specify an alternate transport layer on the command line if
your OS does not implement a fully integrated kernel driver subsystem
that allows to
access any drive using SCSI commands via a single unique user
interface.
cfdisk* --
split HDD into a partitions.
* it needs to be executed as Super User a.k.a root
cfdisk is a curses based program for partitioning any hard disk drive.
Typical values of the device argument are:
/dev/hda [default]
/dev/hdb
/dev/sda
/dev/sdb
/dev/sdc
/dev/sdd
chfn --
change user name and information.
The chfn command changes user fullname, office number, office
extension, and home phone number information for a user´s
account. This information is
typically printed by finger and similar programs. A normal user may
only change the fields for his/her own account, subject to the
restrictions in
/etc/login.defs. (The default configuration is to prevent users from
changing their fullname.) The superuser may change any field for any
account.
Additionally, only the superuser may use the -o option to change the
undefined portions of the GECOS field.
chsh --
change login shell.
The chsh command changes the user login shell. This determines the name
of the user´s initial login command. A normal user may only
change the login shell
for her own account, the superuser may change the login shell for any
account.
chgrp*
-- change group ownership
* it needs to be executes as SuperUser a.k.a root
Change the group of each FILE to GROUP. With --reference, change the
group of each FILE to that of RFILE.
chmod --
change permissions for access to a file.
chmod changes the file mode bits of each given file according to mode,
which can be either a symbolic representation of changes to make, or an
octal number representing the bit pattern for the new mode bits.
chown --
change file owner and group.
chown changes the user and/or group ownership of each given file. If
only an owner (a user name or
numeric user ID) is given, that user is made the owner of each given
file, and the files' group is not changed. If the owner is followed by
a colon and a
group name (or numeric group ID), with no spaces between them, the
group ownership of the files is changed as well. If a colon but no
group name follows
the user name, that user is made the owner of the files and the group
of the files is changed to that user's login group. If the colon and
group are
given, but the owner is omitted, only the group of the files is
changed; in this case, chown performs the same function as chgrp. If
only a colon is
given, or if the entire operand is empty, neither the owner nor the
group is changed.
chroot --
run command or interactive shell with special root directory.
Ordinarily, file names are looked up starting at the root of the
directory structure, i.e., `/'. `chroot' changes the root to the
directory NEWROOT (which must exist) and then runs COMMAND with
optional ARGS. If COMMAND is not specified, the default is the value
of the `SHELL' environment variable or `/bin/sh' if not set, invoked
with the `-i' option. COMMAND must not be a special built-in utility.
cksum
-- checksum and count the bytes in a file.
cksum computes a cyclic redundancy check (CRC) checksum for each
given FILE, or standard input if none are given or for a FILE of `-'.
clear --
clear the terminal screen.
clear clears your screen if
this is possible. It looks in the environment for the
terminal type and then in the terminfo database to figure out how to
clear the screen.
cmp --
compare two files byte by byte.
In the simplest case, two file names FROM-FILE and TO-FILE are
given, and `diff' compares the contents of FROM-FILE and TO-FILE. A
file name of `-' stands for text read from the standard input. As a
special case, `diff - -' compares a copy of standard input to itself.
comm --
compare two sorted files line by line.
comm writes to standard output lines that are common, and lines that
are unique, to two input files; a file name of `-' means standard
input.
command --
execute a simple command.
The command utility will cause the shell to treat the arguments as a
simple command, suppressing the shell function lookup that is described
in Command
Search and Execution, item 1b.
continue --
continue for, while, or until loop.
The continue utility will return to the top of the smallest enclosing
for, while, or until loop, or to the top of the nth enclosing loop, if
n is specified. This
involves repeating the condition list of a while or until
loop or performing the next assignment of a for loop, and re-executing
the loop if appropriate.
cp -- copy
files and directories.
cp copies files (or, optionally, directories). The copy is
completely independent of the original. You can either copy
one file to another, or copy arbitrarily many files to a destination
directory.
crontab --
maintain crontab files for individual users.
Crontab is the program used to install, deinstall or list the tables
used to drive the cron daemon in ISC Cron. Each user can have their own
crontab,
and though these are files in /var, they are not intended to be edited
directly.
csplit --
split a file into sections determined by context lines.
csplit creates zero or more output files containing sections of INPUT
(standard input if INPUT is `-').
curl --
transfer a URL.
curl is a tool to transfer data from or to a server, using one of the
supported protocols (HTTP, HTTPS, FTP, FTPS, SCP, SFTP, TFTP, DICT,
TELNET, LDAP or
FILE). The command is designed to work without user interaction.
cut --
remove sections from each line of files.
cut writes to standard output selected parts of each line of each input
file, or standard input if no files are given or for a file name of
`-'.
date --
print or set the system date and time.
Display the current time in the given FORMAT, or set the system date.
dc -- an
arbitrary precision calculator.
dc is a reverse-polish desk calculator which supports unlimited
precision arithmetic. It also allows you to define and call macros.
Normally dc reads
from the standard input; if any command arguments are given to it, they
are filenames, and dc reads and executes the contents of the files
before reading
from standard input. All normal output is to standard output; all error
output is to standard error.
dd --
convert and copy a file.
dd copies a file (from standard input to standard output, by default)
with a changeable I/O block size, while optionally performing
conversions on it.
df --
report file system disk space usage.
Disk space is shown in 1K blocks by default, unless the
environment variable POSIXLY_CORRECT is set, in which case 512-byte
blocks are used.
diff --
compare files one by one (shows the difference between two
files).
In the simplest case, two file names FROM-FILE and TO-FILE are
given, and `diff' compares the contents of FROM-FILE and TO-FILE. A
file name of `-' stands for text read from the standard input. As a
special case, `diff - -' compares a copy of standard input to itself.
diff3 --
compare and show the difference between 3 files.
dir -- list
directory contents.
List information about the FILEs (the current directory by default).
Sort entries alphabetically if none of -cftuvSUX nor --sort.
dircolors --
color setup for ls.
dircolors outputs a sequence of shell commands to set up the terminal
for color output from `ls' (and `dir', etc.).
dirname --
strip non-directory suffix from file name.
dirname prints all but the final slash-delimited component of a
string (presumably a file name).
du --
estimate file space usage.
Summarize disk usage of each FILE, recursively for directories.
echo --
display a line of text.
echo' writes each given STRING to standard output, with a space between
each and a newline after the last one.
ed -- text
editor
ed is a line-oriented text editor. It is used to create, display,
modify and otherwise manipulate text files.
egrep --
print lines matching a pattern.
egrep is the same as grep -E.
eject --
eject removable media.
Eject allows removable media (typically a CD-ROM, floppy disk, tape, or
JAZ or ZIP disk) to be ejected under software control. The command can
also control
some multi-disc CD-ROM changers, the auto-eject feature supported by
some devices, and close the disc tray of some CD-ROM drives.
env --
run a program in a modified environment.
eval --
construct command by concatenating arguments.
The eval utility will construct a command by concatenating arguments
together, separating each with a . The constructed
command shall be read and
executed by the shell.
exec
--
execute commands and open, close, or copy file descriptors.
The exec utility will open, close, and/or copy file
descriptors as
specified by any redirections as part of the command.
exit
--
cause the shell to exit.
expand
--
convert tabs to spaces.
Convert tabs in each FILE to spaces, writing to standard
output. With no FILE, or when FILE is -, read standard input.
export
--
set the export attribute for variables.
The shell will give the export attribute to the variables
corresponding
to the specified names, which shall cause them to be in the environment
of subse‐
quently executed commands. If the name of a variable is followed by =
word, then the value of that variable shall be set to word.
expr
--
evaluate expressions.
expr evaluates an expression and writes the result on
standard
output. Each token of the expression must be a separate argument.
factor
--
factor numbers.
flase
-- do
nothing, unsuccessfully.
false' does nothing except return an exit status of 1,
meaning
"failure". It can be used as a place holder in shell scripts where an
unsuccessful command is needed. In most modern shells, `false' is a
built-in command, so when you use `false' in a script, you're probably
using the built-in command.
fdformat
--
Low-level formats a floppy disk.
fdisk*
--
Partition table manipulator.
* it needs to be executed as SuperUser a.k.a. root
Hard disks can be divided into one or more logical disks
called
partitions. This division is described in the partition table found in
sector 0 of the
disk.
fg
-- run
jobs in the foreground.
If job control is enabled, fg will move a background job
from the
current environment into the foreground.
file
-- determine file type.
file tests each argument in an attempt to classify it.
There are three sets of tests, performed in this order: filesystem
tests, magic tests, and language
tests. The first test that succeeds causes the file type to be printed.
fgrep
-- print lines matching a pattern
fgrep is the same as grep -F
find
-- search for files in a directory hierarchy
See Howto
Find files with find
For additional questions or comment please refer to our FORUM
de.li.cio.us