Beruflich Dokumente
Kultur Dokumente
Sunil Kumar
July 23, 2014
Contents
1 The Shell
2 Syntax of Command
3 About Command
5 Text processing
6 Process management
8 Miscellaneous Commands
The Shell
Shell is command line interpreter, that provides the interface for Linux system. It take input from keyboard as command and transfer to operating
system kernel to carry out. In GUI, KDE uses konsole and GNOME uses
gnome-terminal to interact with the shell.
Shell has two type of shell prompt: $ and #, which represents user level
and root(system administrator) level interaction respectively. User or root
use a set of command on the shell to interact with Linux system.
Syntax of Command
About Command
type - Display information about command type
Argument: command-name
which - Locate a command
Argument: command-name
help - Display reference page for shell builtin
Useful options: shell in-build command
Argument: command-name
man - Display an on-line command reference
Argument: command-name
info - Display an info document of a command (all about the command)
Argument: command-name
whatis - display manual page descriptions
Argument: command-name
apropos - search the manual page names and descriptions
Argument: command-name
whereis - locate the binary, source, and manual page files for a command
Argument: command-name
alias - Define or display aliases of a command
Useful options: -p
2
Argument: command-name
unalias - Remove each NAME from the list of defined aliases
Useful options: -a
Argument: command-name
Text processing
cat - concatenate files and print on the standard output
Argument: file-name/s
sort - sort lines of text files
Useful options: -d, -f, -g, -n, -m, -r, -o
Argument: file-name/s
wc - print newline, word, and byte counts for each file
Useful options: -c, -l, -m, -w
Argument: file-name]
5
Process management
ps - report a snapshot of the current processes
Useful options: -A, T, r, -p, -u
Argument: optional process-name or -id
top - display Linux processes in a dynamic real-time view
Useful options: -d, -H, -p, -u
bg - Move jobs to the background
Argument: job-name
fg - Move job to the foreground.
Argument: job-name
kill - terminate a process
Useful options: -n (n=1-9)
Argument: pid (process-id)
Miscellaneous Commands
date - print or set the system date and time
Useful options: -d, -S, -u, date
Environmental variable: TZ (time zone)
cal - display a calendar
Useful options: -1, -3, -s, -m , -y