Commands with Scripting



A command-line interface (CLI) processes commands to a computer program in the form of lines of text. The program which handles the interface is called a command-line interpreter or command-line processor. Operating systems implement a command-line interface in a shell for interactive access to operating system functions or services. Such access was primarily provided to users by computer terminals starting in the mid-1960s, and continued to be used throughout the 1970s and 1980s on VAX/VMS, Unix systems.


A command-line interpreter, or command language interpreter, is a blanket term for a certain class of programs designed to read lines of text entered by a user, thus implementing a command-line interface.


A shell is a user interface for access to an operating system's services. In general, operating system shells use either a command-line interface (CLI) or graphical user interface (GUI), depending on a computer's role and particular operation. It is named a shell because it is the outermost layer around the operating system.


Bourne shell (sh) - C shell (csh) - Bash (Unix shell) – KornShell (ksh)


Command: a command is an instruction given by a user telling a computer to do something, such a run a single program or a group of linked programs. Commands are generally issued by typing them in at the command line (i.e., the all-text display mode) and then pressing the ENTER key, which passes them to the shell.


Group: is an access control to specific data or command for defined users that only administrator able to mange them [/etc/group].


IEEE Std 1003.1-2008 Utilities

admin SCCS Create and administer SCCS files
alias Misc Define or display aliases
ar Misc Create and maintain library archives
asa Text processing Interpret carriage-control characters
at Process management Execute commands at a later time
awk Text processing Pattern scanning and processing language
basename Filesystem Return non-directory portion of a pathname; see also dirname
batch Process management Schedule commands to be executed in a batch queue
bc Misc Arbitrary-precision arithmetic language
bg Process management Run jobs in the background
cc/c99 C programming Compile standard C programs
cal Misc Print a calendar
cat Filesystem Concatenate and print files
cd Filesystem Change the working directory
cflow C programming Generate a C-language call graph
chgrp Filesystem Change the file group ownership
chmod Filesystem Change the file modes/attributes/permissions
chown Filesystem Change the file ownership
cksum Filesystem Write file checksums and sizes
cmp Filesystem Compare two files; see also diff
comm Text processing Select or reject lines common to two files
command Shell programming Execute a simple command
compress Filesystem Compress data
cp Filesystem Copy files
crontab Misc Schedule periodic background work
csplit Text processing Split files based on context
ctags C programming Create a tags file
cut Text processing Cut out selected fields of each line of a file
cxref C programming Generate a C-language program cross-reference table
date Misc Display the date and time
dd Filesystem Convert and copy a file
delta SCCS Make a delta (change) to an SCCS file
df Filesystem Report free disk space
diff Text processing Compare two files; see also cmp
dirname Filesystem Return the directory portion of a pathname; see also basename
du Filesystem Estimate file space usage
echo Shell programming Write arguments to standard output
ed Text processing The standard text editor
env Misc Set the environment for command invocation
ex Text processing Text editor
expand Text processing Convert tabs to spaces
expr Shell programming Evaluate arguments as an expression
false Shell programming Return false value
fc Misc Process the command history list
fg Process management Run jobs in the foreground
file Filesystem Determine file type
find Filesystem Find files
fold Text processing Filter for folding lines
fort77 FORTRAN77 programming FORTRAN compiler
fuser Process management List process IDs of all processes that have one or more files open
gencat Misc Generate a formatted message catalog
get SCCS Get a version of an SCCS file
getconf Misc Get configuration values
getopts Shell programming Parse utility options
grep Misc Search text for a pattern
hash Misc Hash database access method
head Text processing Copy the first part of files
iconv Text processing Codeset conversion
id Misc Return user identity
ipcrm Misc Remove a message queue, semaphore set, or shared memory segment identifier
ipcs Misc Report interprocess communication facilities status
jobs Process management Display status of jobs in the current session
join Text processing Merges two sorted text files based on the presence of a common field
kill Process management Terminate or signal processes
lex C programming Generate programs for lexical tasks
link Filesystem Create a hard link to a file
ln Filesystem Link files
locale Misc Get locale-specific information
localedef Misc Define locale environment
logger Shell programming Log messages
logname Misc Return the user's login name
lp Text processing Send files to a printer
ls Filesystem List directory contents
m4 Misc Macro processor
mailx Misc Process messages
make Programming Maintain, update, and regenerate groups of programs
man Misc Display system documentation
mesg Misc Permit or deny messages
mkdir Filesystem Make directories
mkfifo Filesystem Make FIFO special files
more Text processing Display files on a page-by-page basis
mv Filesystem Move or rename files
newgrp Misc Change to a new group
nice Process management Invoke a utility with an altered nice value
nl Text processing Line numbering filter
nm C programming Write the name list of an object file
nohup Process management Invoke a utility immune to hangups
od Misc Dump files in various formats
paste Text processing Merge corresponding or subsequent lines of files
patch Text processing Apply changes to files
pathchk Filesystem Check pathnames
pax Misc Portable archive interchange
pr Text processing Print files
printf Shell programming Write formatted output
prs SCCS Print an SCCS file
ps Process management Report process status
pwd Filesystem Print working directory
qalter Batch utilities Alter batch job
qdel Batch utilities Delete batch jobs
qhold Batch utilities Hold batch jobs
qmove Batch utilities Move batch jobs
qmsg Batch utilities Send message to batch jobs
qrerun Batch utilities Rerun batch jobs
qrls Batch utilities Release batch jobs
qselect Batch utilities Select batch jobs
qsig Batch utilities Signal batch jobs
qstat Batch utilities Show status of batch jobs
qsub Batch utilities Submit a script
read Shell programming Read a line from standard input
renice Process management Set nice values of running processes
rm Filesystem Remove directory entries
rmdel SCCS Remove a delta from an SCCS file
rmdir Filesystem Remove directories, if they are empty.
sact SCCS Print current SCCS file-editing activity
sccs SCCS Front end for the SCCS subsystem
sed Text processing Stream editor
sh Shell programming Shell, the standard command language interpreter
sleep Shell programming Suspend execution for an interval
sort Text processing Sort, merge, or sequence check text files
split Misc Split files into pieces
strings C programming Find printable strings in files
strip C programming Remove unnecessary information from executable files
stty Misc Set the options for a terminal
tabs Misc Set terminal tabs
tail Text processing Copy the last part of a file
talk Misc Talk to another user
tee Shell programming Duplicate the standard output
test Shell programming Evaluate expression
time Process management Time a simple command
touch Filesystem Change file access and modification times
tput Misc Change terminal characteristics
tr Text processing Translate characters
true Shell programming Return true value
tsort Text processing Topological sort
tty Misc Return user's terminal name
type Misc Displays how a name would be interpreted if used as a command
ulimit Misc Set or report file size limit
umask Misc Get or set the file mode creation mask
unalias Misc Remove alias definitions
uname Misc Return system name
uncompress Misc Expand compressed data
unexpand Text processing Convert spaces to tabs
unget SCCS Undo a previous get of an SCCS file
uniq Text processing Report or filter out repeated lines in a file
unlink Filesystem Call the unlink function
uucp Network System-to-system copy
uudecode Network Decode a binary file
uuencode Network Encode a binary file
uustat Network uucp status inquiry and job control
uux Process management Remote command execution
val SCCS Validate SCCS files
vi Text processing Screen-oriented (visual) display editor
wait Process management Await process completion
wc Text processing Line, word and byte or character count
what SCCS Identify SCCS files
who System administration Display who is on the system
write Misc Write to another user's terminal
xargs Shell programming Construct argument lists and invoke utility
yacc C programming Yet another compiler compiler
zcat Text processing Expand and concatenate data


Other Useful Commands

badblocks - search a device for bad blocks

bind - bind a name to a socket

chdir - change current working directory

chroot - run command or interactive shell with special root directory

clear - sweep terminal screen

column - columnate lists

cut - remove sections from each line of files

dig - DNS lookup utility

dmesg - display the system message buffer

dmidecode - DMI table decoder

eject - eject removable media

exit - cause normal process termination

factor - primes, factor a number, generate large primes

fdisk - Partition table manipulator

finger - user information lookup program

free - display amount of free and used memory in the system

fsck - file system consistency check and interactive repair

grep - print lines matching a pattern

groups - show group memberships

gzip - compression/decompression tool

help - display help information

history - GNU History Library

hostname - set or print name of current host system

htop - interactive process viewer

iostat - report I/O statistics

killall - kill processes by name

last - indicate last logins of users and ttys

locate - find filenames quickly

login - log into the computer

logout - log out the session

lsof - list open files

mktemp - create a temporary file or directory

mount - filesystem change name space

nano - editor, an enhanced free Pico clone

netstat - show network status and statistics

nmap - Network exploration tool and security / port scanner

read - read from a file descriptor

set - change the options and positional parameters

scp - secure copy (remote file copy program)

screen - screen manager with VT100/ANSI terminal emulation

stat - display file status

passwd - modify a user's password

ping - send ICMP ECHO_REQUEST packets to network hosts

reboot - stopping and restarting the system

rsync - a fast, versatile, remote (and local) file-copying tool

scrot - command line screen capture utility

shutdown - close down the system at a given time

ssh - OpenSSH SSH client (remote login program)

sudo - execute a command as another user

swapon, swapoff - enable/disable devices and files for paging and swapping

sync - force completion of pending disk writes (flush cache)

tar - manipulate tape archives

telnet - user interface to the TELNET protocol

tcpdump - dump traffic on a network

tree - list contents of directories in a tree-like format

uname - display information about the system

unset - remove variable or function names

uptime - show how long system has been running

rev - reverse lines of a file

whatis - search manual page databases

which - locate a program file in the user's path

whoami - display effective user id

whois - domain name and network number directory service

wipe - securely erase files from magnetic media


Linux Specific Commands

btrfs - control a btrfs filesystem

cryptsetup - setup cryptographic volumes for dm-crypt

fsarchiver - a disk cloning utility

grub - GRand Unified Bootloader command shell

hdparm - get/set SATA/IDE device parameters

nproc - print the number of processing units available

ifconfig - configure a network interface

iptables - administration tool for IPv4 packet filtering and NAT

iwlist - get more detailed wireless information from a wireless interface

kmod - Program to manage Linux Kernel modules

lsblk - list block devices

lscpu - display information about the CPU architecture

lshw - list hardware devices

lspci - list all PCI devices

lsusb - list USB devices

mkfs - build a Linux file system

modprobe - program to add and remove modules from the Linux Kernel

mpstat - Report processors related statistics

sysctl - configure kernel parameters at runtime

useradd - create a new user or update default new user information

userdel - delete a user account and related files

usermod - modify a user account

vmstat - Report virtual memory statistics


grub-install (install GRUB on your drive)

update-grub (program to generate GRUB's menu.lst file)

GRUB is the GRand Unified Bootloader, a very powerful newish BootLoader that can be used to boot most operating system


BSD Specific Commands

adduser - command for adding new users

boot0cfg - boot manager installation/configuration utility

bsdlabel - read and write BSD label

dump - rdump, file system backup

dumpfs - dump UFS file system information

gbde - operation and management utility for Geom Based Disk Encryption

geli - control utility for the cryptographic GEOM class

geom - universal control utility for GEOM classes
gjournal - control utility for journaled devices

gpart - control utility for the disk partitioning GEOM class

gptboot - GPT bootcode for UFS on BIOS-based computers

growfs - expand an existing UFS file system

gvinum - Logical Volume Manager control program

ipfw - administration tool for IPv4 packet filtering and NAT

jail, jail_get, jail_set, jail_remove, jail_attach - create and manage system jails

kldload - load a file into the kernel

kldunload - unload a file from the kernel

newfs - construct a new UFS1/UFS2 file system

pw - create, remove, modify & display system users and groups

restore - rrestore, restore files or file systems from backups made with dump

rmuser - remove users from the system

sysctl - get or set kernel state

tunefs - tune up an existing UFS file system


freebsd-update fetch

Based on the currently installed world and the configuration options set, fetch all available binary updates.


freebsd-update install

Install the most recently fetched updates or upgrade. Returns exit code 2 if there are no updates to install and the fetch command wasn't passed as an earlier argument in the same invo-cation.


freebsd-version -k

Print the version and patch level of the installed kernel. Unlike uname, if a new kernel has been installed but the system has not yet rebooted, freebsd-version will print the version and patch level of the new kernel.


freebsd-version -u

Print the version and patch level of the installed userland. These are hardcoded into freebsd-version during the build.


Please login to rate this.
5/5 : 1000 Votes Protection Status
Click here to update your cookies settings