BusyBox Command Descriptions
BusyBox Command Descriptions
addgroup
addgroup [-g GID] group_name [user_name]
Adds a group to the system
Options:
-g GID specify gid
-------------------------------
adduser
adduser [OPTIONS] user_name
Adds a user to the system
Options:
-h DIR Assign home directory DIR
-------------------------------
adjtimex
adjtimex [-q] [-o offset] [-f frequency] [-p timeconstant] [-t tick]
Reads and optionally sets system timebase parameters. See adjtimex(2).
Options:
-q quiet mode - do not print
-p timeconstant
-------------------------------
ar
ar [-o] [-v] [-p] [-t] [-x] ARCHIVE FILES
Extract or list FILES from an ar archive.
Options:
-o preserve original dates
-p extract to stdout
-t list
-x extract
-------------------------------
arping
arping [-fqbDUA] [-c count] [-w timeout] [-I device] [-s sender] target
Ping hosts by ARP requests/replies.
Options:
-f Quit on first ARP reply
-q Be quiet
-------------------------------
ash
ash [FILE]... or: ash -c command [args]...
The ash shell (command interpreter)
-------------------------------
awk
awk [OPTION]... [program-text] [FILE ...]
Options:
-v var=val assign value 'val' to variable 'var'
-------------------------------
basename
basename FILE [SUFFIX]
Strips directory path and suffixes from FILE. If specified, also removes any trailing SUFFIX.
Example:
$ basename /usr/local/bin/foo
foo
$ basename /usr/local/bin/
bin
bar
-------------------------------
bunzip2
bunzip2 [OPTION]... [FILE]
Uncompress FILE (or standard input if FILE is '-' or omitted).
Options:
-c Write output to standard output
-f Force
-------------------------------
bzcat
bzcat FILE
Uncompress to stdout.
-------------------------------
cal
-------------------------------
cat
cat [-u] [FILE]...
Example:
$ cat /proc/uptime
110716.72 17.67
-------------------------------
chgrp
chgrp [OPTION]... GROUP FILE...
Change the group membership of each FILE to GROUP.
Options:
-R Changes files and directories recursively.
Example:
$ ls -l /tmp/foo
$ ls -l /tmp/foo
-------------------------------
chmod
chmod [-R] MODE[,MODE]... FILE...
Each MODE is one or more of the letters ugoa, one of the symbols +-= and one or more of the
letters rwxst.
Options:
-R Changes files and directories recursively.
Example:
$ ls -l /tmp/foo
$ ls -l /tmp/foo
$ ls -l /tmp/foo
-------------------------------
chown
chown [ -Rh ]... OWNER[<.|:>[GROUP]] FILE...
Change the owner and/or group of each FILE to OWNER and/or GROUP.
Options:
-R Changes files and directories recursively.
Example:
$ ls -l /tmp/foo
$ ls -l /tmp/foo
ls -l /tmp/foo
-------------------------------
chroot
chroot NEWROOT [COMMAND...]
Run COMMAND with root directory set to NEWROOT.
Example:
$ ls -l /bin/ls
# chroot /mnt
# ls -l /bin/ls
-------------------------------
chvt
chvt N
Changes the foreground virtual terminal to /dev/ttyN
-------------------------------
clear
clear
Clear screen.
-------------------------------
cmp
cmp [-l] [-s] FILE1 [FILE2]
Compare files. Compares FILE1 vs stdin if FILE2 is not specified.
Options:
-l Write the byte numbers (decimal) and values (octal)
-------------------------------
cp
cp [OPTION]... SOURCE DEST
-d Preserves links
-------------------------------
cpio
cpio -[dimtuv][F cpiofile]
Extract or list files from a cpio archive Main operation mode:
d make leading directories
i extract
m preserve mtime
t list
v verbose
u unconditional overwrite
-------------------------------
crond
crond -d[#] -c <crondir> -f -b
-d [#] -l [#] -S -L logfile -f -b -c dir
-f run in fordeground
-------------------------------
crontab
crontab [-c dir] {file|-}|[-u|-l|-e|-d user]
file <opts> replace crontab from file
-------------------------------
cut
cut [OPTION]... [FILE]...
Prints selected fields from each input FILE to standard output.
Options:
-b LIST Output only bytes from LIST
-n Ignored
Example:
$ echo "Hello world" | cut -f 1 -d ' '
Hello
world
-------------------------------
date
date [OPTION]... [MMDDhhmm[[CC]YY][.ss]] [+FORMAT]
Displays the current time in the given FORMAT, or sets the system date.
Options:
-R Outputs RFC-822 compliant date string
Example:
$ date
-------------------------------
dc
dc expression ...
This is a Tiny RPN calculator that understands the following operations: +, add, -, sub, *, mul,
/, div, %, mod, **, exp, and, or, not, eor. For example: 'dc 2 2 add' -> 4, and 'dc 8 8 \* 2 2 + /' -
> 16.
Options: p - Prints the value on the top of the stack, without altering the stack. f - Prints the
entire contents of the stack without altering anything. o - Pops the value off the top of the stack
and uses it to set the output radix.
Only 10 and 16 are supported.
Example:
$ dc 2 2 + p
$ dc 8 8 \* 2 2 + / p
16
$ dc 0 1 and p
$ dc 0 1 or p
64
-------------------------------
dd
[seek=N] [conv=notrunc|noerror|sync]
4+0 records in
-------------------------------
deallocvt
deallocvt [N]
Deallocate unused virtual terminal /dev/ttyN
-------------------------------
delgroup
delgroup GROUP
Deletes group GROUP from the system
-------------------------------
deluser
deluser USER
Deletes user USER from the system
-------------------------------
devfsd
devfsd mntpnt [-v][-fg][-np]
Optional daemon for managing devfs permissions and old device name symlinks.
Options:
mntpnt The mount point where devfs is mounted.
-------------------------------
df
df [-hmk] [FILESYSTEM ...]
Print the filesystem space used and space available.
Options:
-h print sizes in human readable format (e.g., 1K 243M 2G )
Example:
$ df
$ df /dev/sda3
-------------------------------
dirname
dirname FILENAME
Strips non-directory suffix from FILENAME
Example:
$ dirname /tmp/foo
/tmp
$ dirname /tmp/foo/
/tmp
-------------------------------
dmesg
dmesg [-c] [-n LEVEL] [-s SIZE]
Prints or controls the kernel ring buffer
Options:
-c Clears the ring buffer's contents after printing
-------------------------------
dos2unix
dos2unix [option] [FILE]
Converts FILE from dos format to unix format. When no option is given, the input is converted
to the opposite output format. When no file is given, uses stdin for input and stdout for output.
Options:
-u output will be in UNIX format
-------------------------------
dpkg
dpkg [-ilCPru] [-F option] package_name
dpkg is a utility to install, remove and manage Debian packages.
Options:
-i Install the package
-------------------------------
dpkg-deb
dpkg-deb [-cefxX] FILE [argument]
Perform actions on Debian packages (.debs)
Options:
-c List contents of filesystem tree
-X Verbose extract
Example:
$ dpkg-deb -X ./busybox_0.48-1_i386.deb /tmp
-------------------------------
du
du [-aHLdclsxhmk] [FILE]...
Summarizes disk space used for each FILE and/or directory. Disk space is printed in units of
1024 bytes.
Options:
-a show sizes of files in addition to directories
Example:
$ du
16 ./CVS
12 ./kernel-patches/CVS
80 ./kernel-patches
12 ./tests/CVS
36 ./tests
12 ./scripts/CVS
16 ./scripts
12 ./docs/CVS
104 ./docs
2417 .
-------------------------------
dumpkmap
dumpkmap > keymap
Prints out a binary keyboard translation table to standard output.
Example:
$ dumpkmap > keymap
-------------------------------
dumpleases
dumpleases [-r|-a] [-f LEASEFILE]
Displays the DHCP leases granted by udhcpd.
Options:
-f, --file=FILENAME Leases file to load
-------------------------------
echo
echo [-neE] [ARG ...]
Prints the specified ARGs to stdout
Options:
-n suppress trailing newline
Example:
Erik is cool
$ echo -e "Erik\nis\ncool"
Erik
is
cool
$ echo "Erik\nis\ncool"
Erik\nis\ncool
-------------------------------
env
env [-iu] [-] [name=value]... [command]
Prints the current environment or runs a program after setting up the specified environment.
Options:
-, -i start with an empty environment
-------------------------------
expr
expr EXPRESSION
Prints the value of EXPRESSION to standard output.
EXPRESSION may be:
ARG1 | ARG2 ARG1 if it is neither null nor 0, otherwise ARG2
or 0
Beware that many operators need to be escaped or quoted for shells. Comparisons are
arithmetic if both ARGs are numbers, else lexicographical. Pattern matches return the string
matched between \( and \) or null; if \( and \) are not used, they return the number of characters
matched or 0.
-------------------------------
false
false
Return an exit code of FALSE (1).
Example:
$ false
$ echo $?
-------------------------------
fbset
fbset [options] [mode]
Show and modify frame buffer settings
Example:
$ fbset
mode "1024x768-76"
accel false
rgba 5/11,6/5,5/0,0/0
endmode
-------------------------------
fdflush
fdflush DEVICE
Forces floppy disk drive to detect disk change
-------------------------------
fdformat
fdformat [-n] DEVICE
Low-level formats a floppy disk
Options:
-n Don't verify after format
-------------------------------
fdisk
fdisk [-luv] [-C CYLINDERS] [-H HEADS] [-S SECTORS] [-b SSZ] DISK
Change partition table Options:
-l List partition table(s)
-------------------------------
find
find [PATH...] [EXPRESSION]
Search for files in a directory hierarchy. The default PATH is the current directory; default
EXPRESSION is '-print'
EXPRESSION may consist of:
-follow Dereference symbolic links.
or exactly (NNN)
-mtime TIME Modified time is greater than (+N); less than (-N);
Example:
$ find / -name passwd
/etc/passwd
-------------------------------
fold
fold [-bsw] [FILE]
Wrap input lines in each FILE (standard input by default), writing to standard output.
Options:
-b count bytes rather than columns
-s break at spaces
-------------------------------
free
free
Displays the amount of free and used system memory
Example:
$ free
-------------------------------
freeramdisk
freeramdisk DEVICE
Frees all memory used by the specified ramdisk.
Example:
$ freeramdisk /dev/ram2
-------------------------------
fsck.minix
fsck.minix [-larvsmf] /dev/name
Performs a consistency check for MINIX filesystems.
Options:
-l Lists all filenames
-v verbose
-------------------------------
ftpget
ftpget [options] remote-host local-file remote-file
Retrieve a remote file via FTP.
Options:
-c, --continue Continue a previous transfer
-------------------------------
ftpput
ftpput [options] remote-host remote-file local-file
Store a local file on a remote machine via FTP.
Options:
-v, --verbose Verbose
-------------------------------
getopt
getopt [OPTIONS]...
Parse command options
-a, --alternative Allow long options starting with
single -
Example:
$ cat getopt.test
#!/bin/sh
-n 'example.busybox' -- "$@"`
if [ $? != 0 ] ; then exit 1 ; fi
while true ; do
case $1 in
-c|--c-long)
case "$2" in
esac ;;
esac
done
-------------------------------
getty
getty [OPTIONS]... baud_rate,... line [termtype]
Opens a tty, prompts for a login name, then invokes /bin/login
Options:
-h Enable hardware (RTS/CTS) flow control.
-------------------------------
grep
Example:
$ grep root /etc/passwd
root:x:0:0:root:/root:/bin/bash
root:x:0:0:root:/root:/bin/bash
-------------------------------
gunzip
gunzip [OPTION]... FILE
Uncompress FILE (or standard input if FILE is '-').
Options:
-c Write output to standard output
Example:
$ ls -la /tmp/BusyBox*
$ gunzip /tmp/BusyBox-0.43.tar.gz
$ ls -la /tmp/BusyBox*
-------------------------------
gzip
gzip [OPTION]... [FILE]...
Compress FILE(s) with maximum compression. When FILE is '-' or unspecified, reads
standard input. Implies -c.
Options:
-c Write output to standard output instead of FILE.gz
-d Decompress
Example:
$ ls -la /tmp/busybox*
$ gzip /tmp/busybox.tar
$ ls -la /tmp/busybox*
-------------------------------
halt
halt [-d<delay>]
Halt the system. Options:
-d delay interval for halting.
-------------------------------
hdparm
hdparm [options] [device] ..
Options: -a get/set fs readahead
-A set drive read-lookahead flag (0/1)
-------------------------------
head
head [OPTION]... [FILE]...
Print 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.
Options:
-n NUM Print first NUM lines instead of first 10
Example:
$ head -n 2 /etc/passwd
root:x:0:0:root:/root:/bin/bash
daemon:x:1:1:daemon:/usr/sbin:/bin/sh
-------------------------------
hexdump
hexdump [-[bcdefnosvx]] [OPTION] FILE
The hexdump utility is a filter which displays the specified files, or the standard input, if no
files are specified, in a user specified format
-b One-byte octal display
-e FORMAT STRING
-f FORMAT FILE
-------------------------------
hostid
hostid
Example:
$ hostname
sage
-------------------------------
httpd
httpd [-c <conf file>] [-p <port>] [-u user] [-r <realm>] [-m pass] [-h home] [-d/-e <string>]
Listens for incoming http server requests.
Options:
-c FILE Specifies configuration file. (default httpd.conf)
-------------------------------
hwclock
hwclock [-r|--show] [-s|--hctosys] [-w|--systohc] [-l|--localtime] [-u|--utc]
-------------------------------
id
id [OPTIONS]... [USERNAME]
Print information for USERNAME or the current user
Options:
-c prints only the security context
Example:
$ id
uid=1000(andersen) gid=1000(andersen)
-------------------------------
ifconfig
ifconfig [-a] <interface> [<address>]
configure a network interface
Options: [add <address>[/<prefixlen>]] [del <address>[/<prefixlen>]]
[[-]broadcast [<address>]] [[-]pointopoint [<address>]]
[up|down] ...
-------------------------------
ifdown
ifdown <-ahinv> <ifaces...>
ifdown <options> <ifaces...>
Options:
-h this help
-f force de/configuration
-------------------------------
ifup
ifup <-ahinv> <ifaces...>
ifup <options> <ifaces...>
Options:
-h this help
-f force de/configuration
-------------------------------
inetd
inetd [-q len] [conf]
-------------------------------
init
init
Init is the parent of all processes.
This version of init is designed to be run only by the kernel.
BusyBox init doesn't support multiple runlevels. The runlevels field of the /etc/inittab file is
completely ignored by BusyBox init. If you want runlevels, use sysvinit.
BusyBox init works just fine without an inittab. If no inittab is found, it has the following
default behavior:
::sysinit:/etc/init.d/rcS
::askfirst:/bin/sh
::ctrlaltdel:/sbin/reboot
::shutdown:/sbin/swapoff -a
::shutdown:/bin/umount -a -r
::restart:/sbin/init
tty3::askfirst:/bin/sh
tty4::askfirst:/bin/sh
If you choose to use an /etc/inittab file, the inittab entry format is as follows:
<id>:<runlevels>:<action>:<process>
<id>:
stinkin' utmp.
<runlevels>:
<action>:
that are run only once, and actions that are re-run when the
specified
process exits.
specified process.
<process>:
::sysinit:/etc/init.d/rcS
::askfirst:-/bin/sh
tty2::askfirst:-/bin/sh
tty3::askfirst:-/bin/sh
tty4::askfirst:-/bin/sh
::restart:/sbin/init
::ctrlaltdel:/sbin/reboot
::shutdown:/bin/umount -a -r
::shutdown:/sbin/swapoff -a
-------------------------------
insmod
-v verbose output
-q quiet output
-------------------------------
install
install [-cgmops] [sources] <dest|directory>
Copies files and set attributes
Options:
-c copy the file, default
-d create directories
-o set ownership
-p preserve date
-------------------------------
ip
ip [ OPTIONS ] { address | link | route | tunnel } { COMMAND | help }
ip [ OPTIONS ] OBJECT { COMMAND | help } where OBJECT := { link | addr | route |
tunnel } OPTIONS := { -f[amily] { inet | inet6 | link } | -o[neline] }
-------------------------------
ipaddr
ipaddr {add|del} IFADDR dev STRING ipaddr {show|flush} [ dev STRING ] [ scope SCOPE-
ID ]
[ to PREFIX ] [ label PATTERN ]
-------------------------------
ipcalc
ipcalc [OPTION]... <ADDRESS>[[/]<NETMASK>] [NETMASK]
Calculate IP network settings from a IP address
Options:
-b --broadcast Display calculated broadcast address.
-------------------------------
iplink
iplink
iplink set DEVICE { up | down | arp { on | off } |
dynamic { on | off } |
mtu MTU }
-------------------------------
iproute
iproute { list | flush } SELECTOR iproute get ADDRESS [ from ADDRESS iif STRING ]
-------------------------------
iptunnel
-------------------------------
kill
kill [-signal] process-id [process-id ...]
Send a signal (default is SIGTERM) to the specified process(es).
Options:
-l List all signal names and numbers.
Example:
$ ps | grep apache
$ kill 252
-------------------------------
killall
killall [-q] [-signal] process-name [process-name ...]
Send a signal (default is SIGTERM) to the specified process(es).
Options:
-l List all signal names and numbers.
Example:
$ killall apache
-------------------------------
klogd
klogd [-c n] [-n]
Kernel logger. Options:
-c n Sets the default log level of console messages to n.
-------------------------------
lash
lash [FILE]... or: sh -c command [args]...
The BusyBox LAme SHell (command interpreter)
This command does not yet have proper documentation.
Use lash just as you would use any other shell. It properly handles pipes, redirects, job control,
can be used as the shell for scripts, and has a sufficient set of builtins to do what is needed. It
does not (yet) support Bourne Shell syntax. If you need things like ``if-then-else'', ``while'', and
such use ash or bash. If you just need a very simple and extremely small shell, this will do the
job.
-------------------------------
last
last
Shows listing of the last users that logged into the system
-------------------------------
length
length STRING
-------------------------------
ln
ln [OPTION] TARGET... LINK_NAME|DIRECTORY
Create a link named LINK_NAME or DIRECTORY to the specified TARGET
You may use '--' to indicate that all following arguments are non-options.
Options:
-s make symbolic links instead of hard links
Example:
$ ln -s BusyBox /tmp/ls
$ ls -l /tmp/ls
-------------------------------
loadfont
loadfont < font
Loads a console font from standard input.
Example:
$ loadfont < /etc/i18n/fontname
-------------------------------
loadkmap
loadkmap < keymap
Loads a binary keyboard translation table from standard input.
Example:
$ loadkmap < /etc/i18n/lang-keymap
-------------------------------
logger
logger [OPTION]... [MESSAGE]
Write MESSAGE to the system log. If MESSAGE is omitted, log stdin.
Options:
-s Log to stderr as well as the system log.
Example:
$ logger "hello"
-------------------------------
login
login [OPTION]... [username] [ENV=VAR ...]
Begin a new session on the system
Options:
-f Do not authenticate (user already authenticated)
-p Preserve environment.
-------------------------------
logname
logname
Print the name of the current user.
Example:
$ logname
root
-------------------------------
logread
logread [OPTION]...
Shows the messages from syslogd (using circular buffer).
Options:
-------------------------------
losetup
losetup [OPTION]... LOOPDEVICE FILE or: losetup [OPTION]... -d LOOPDEVICE
Associate LOOPDEVICE with FILE.
Options:
-d Disassociate LOOPDEVICE.
-------------------------------
ls
ls [-1AacCdeFilnpLRrSsTtuvwxXhkK] [filenames...]
List directory contents
Options:
-1 list files in a single column
-------------------------------
lsmod
lsmod
List the currently loaded kernel modules.
-------------------------------
makedevs
makedevs NAME TYPE MAJOR MINOR FIRST LAST [s]
Creates a range of block or character special files
TYPEs include:
b: Make a block (buffered) device.
p: Make a named pipe. MAJOR and MINOR are ignored for named
pipes.
FIRST specifies the number appended to NAME to create the first device. LAST specifies the
number of the last item that should be created. If 's' is the last argument, the base device is
created as well.
For example:
makedevs /dev/ttyS c 4 66 2 63 -> ttyS2-ttyS63
Example:
# makedevs /dev/ttyS c 4 66 2 63
[creates ttyS2-ttyS63]
# makedevs /dev/hda b 3 0 0 8 s
[creates hda,hda1-hda8]
-------------------------------
md5sum
md5sum [OPTION] [FILEs...] or: md5sum [OPTION] -c [FILE]
Print or check MD5 checksums.
Options: With no FILE, or when FILE is -, read standard input.
-c check MD5 sums against given list
The following two options are useful only when verifying checksums:
-s don't output anything, status code shows success
Example:
$ md5sum < busybox
6fd11e98b98a58f64ff3398d7b324003
$ md5sum busybox
6fd11e98b98a58f64ff3398d7b324003 busybox
$ md5sum -c -
6fd11e98b98a58f64ff3398d7b324003 busybox
busybox: OK
^D
-------------------------------
mesg
mesg [y|n]
mesg controls write access to your terminal
y Allow write access to your terminal.
-------------------------------
mkdir
mkdir [OPTION] DIRECTORY...
Example:
$ mkdir /tmp/foo
$ mkdir /tmp/foo
$ mkdir /tmp/foo/bar/baz
$ mkdir -p /tmp/foo/bar/baz
-------------------------------
mkfifo
mkfifo [OPTIONS] name
Creates a named pipe (identical to 'mknod name p')
Options:
-m create the pipe using the specified mode (default a=rw)
-------------------------------
mkfs.minix
mkfs.minix [-c | -l filename] [-nXX] [-iXX] /dev/name [blocks]
Make a MINIX filesystem.
Options:
-c Check the device for bad blocks
-------------------------------
mknod
mknod [OPTIONS] NAME TYPE MAJOR MINOR
Create a special file (block, character, or pipe).
Options:
-m create the special file using the specified mode (default
a=rw)
TYPEs include:
b: Make a block (buffered) device.
p: Make a named pipe. MAJOR and MINOR are ignored for named
pipes.
Example:
$ mknod /dev/fd0 b 2 0
-------------------------------
mkswap
mkswap [-c] [-v0|-v1] device [block-count]
Prepare a disk partition to be used as a swap partition.
Options:
-c Check for read-ability.
2.1.117).
-------------------------------
mktemp
mktemp [-dq] TEMPLATE
Creates a temporary file with its name based on TEMPLATE. TEMPLATE is any name with
six `Xs' (i.e., /tmp/temp.XXXXXX).
Options:
-d Make a directory instead of a file
Example:
$ mktemp /tmp/temp.XXXXXX
/tmp/temp.mWiLjM
$ ls -la /tmp/temp.mWiLjM
-------------------------------
modprobe
modprobe [-knqrsv] [MODULE ...]
Used for high level module loading and unloading.
Options:
-k Make module autoclean-able.
-q Quiet output.
-v Verbose output.
Example:
$ modprobe cdrom
-------------------------------
more
more [FILE ...]
More is a filter for viewing FILE one screenful at a time.
Example:
$ dmesg | more
-------------------------------
mount
mount [flags] DEVICE NODE [-o options,more-options]
Mount a filesystem. Autodetection of filesystem type requires the /proc filesystem be already
mounted.
Flags:
-a: Mount all filesystems in fstab.
-f: "Fake" Add entry to mount table but don't mount it.
There are EVEN MORE flags that are specific to each filesystem. You'll have to see the written
documentation for those filesystems.
Example:
$ mount
-------------------------------
mt
mt [-f device] opcode value
Control magnetic tape drive operation
Available Opcodes:
bsf bsfm bsr bss datacompression drvbuffer eof eom erase fsf fsfm fsr fss load lock mkpart nop
offline ras1 ras2 ras3 reset retension rewind rewoffline seek setblk setdensity setpart tell unload
unlock weof wset
-------------------------------
mv
mv [OPTION]... SOURCE DEST or: mv [OPTION]... SOURCE... DIRECTORY
Options:
-f don't prompt before overwriting
Example:
$ mv /tmp/foo /bin/bar
-------------------------------
nameif
nameif [-s] [-c FILE] [{IFNAME MACADDR}]
Nameif renaming network interface while it in the down state.
Options:
-c FILE Use configuration file (default is /etc/mactab)
Example:
$ nameif -s dmz0 00:A0:C9:8C:F6:3F
or
$ nameif -c /etc/my_mactab_file
-------------------------------
nc
nc [OPTIONS] [IP] [port]
Netcat opens a pipe to IP:port
Options:
-l listen mode, for inbound connects
Example:
$ nc foobar.somedomain.com 25
220 foobar ESMTP Exim 3.12 #1 Sat, 15 Apr 2000 00:03:02 -0600
help
214-Commands supported:
quit
-------------------------------
netstat
netstat [-laenrtuwx]
Netstat displays Linux networking information.
Options:
-l display listening server sockets
-t tcp sockets
-u udp sockets
-w raw sockets
-x unix sockets
-------------------------------
nslookup
nslookup [HOST] [SERVER]
Queries the nameserver for the IP address of the given HOST optionally using a specified DNS
server
Example:
$ nslookup localhost
Server: default
Address: default
Name: debian
Address: 127.0.0.1
-------------------------------
od
od [-aBbcDdeFfHhIiLlOovXx] [FILE]
Write an unambiguous representation, octal bytes by default, of FILE to standard output. With
no FILE, or when FILE is -, read standard input.
-------------------------------
openvt
openvt <vtnum> <COMMAND> [ARGS...]
Start a command on a new virtual terminal
Example:
openvt 2 /bin/ash
-------------------------------
passwd
passwd [OPTION] [name]
Change a user password. If no name is specified, changes the password for the current user.
Options:
-a Define which algorithm shall be used for the password.
-------------------------------
patch
patch [-p<num>]
[-p<num>]
Example:
$ patch -p1 <example.diff
-------------------------------
pidof
pidof process-name [OPTION] [process-name ...]
Lists the PIDs of all processes with names that match the names on the command line. Options:
-s display only a single PID.
Example:
$ pidof init
-------------------------------
ping
ping [OPTION]... host
Send ICMP ECHO_REQUEST packets to network hosts.
Options:
-c COUNT Send only COUNT pings.
Example:
$ ping localhost
-------------------------------
ping6
ping6 [OPTION]... host
Send ICMP ECHO_REQUEST packets to network hosts.
Options:
-c COUNT Send only COUNT pings.
Example:
$ ping6 ip6-localhost
-------------------------------
pivot_root
pivot_root NEW_ROOT PUT_OLD
Move the current root file system to PUT_OLD and make NEW_ROOT the new root file
system.
-------------------------------
poweroff
poweroff [-d<delay>]
Halt the system and request that the kernel shut off the power. Options:
-d delay interval for shutting off.
-------------------------------
printf
printf FORMAT [ARGUMENT...]
Formats and prints ARGUMENT(s) according to FORMAT, Where FORMAT controls the output
exactly as in C printf.
Example:
$ printf "Val=%d\n" 5
Val=5
-------------------------------
ps
ps
Report process status
This version of ps accepts no options.
Options:
Example:
$ ps
-------------------------------
pwd
pwd
Print the full filename of the current working directory.
Example:
$ pwd
/root
-------------------------------
rdate
rdate [-sp] HOST
Get and possibly set the system date and time from a remote HOST.
Options:
-s Set the system date and time (default).
-------------------------------
readlink
readlink
Displays the value of a symbolic link.
-------------------------------
realpath
realpath pathname ...
Returns the absolute pathnames of given argument.
-------------------------------
reboot
reboot [-d<delay>]
Reboot the system. Options:
-d delay interval for rebooting.
-------------------------------
renice
renice priority pid [pid ...]
Changes priority of running processes. Allowed priorities range from 20 (the process runs only
when nothing else is running) to 0 (default priority) to -20 (almost nothing else ever gets to
run).
-------------------------------
reset
reset
Resets the screen.
-------------------------------
rm
rm [OPTION]... FILE...
Remove (unlink) the FILE(s). You may use '--' to indicate that all following arguments are non-
options.
Options:
-i always prompt before removing each destination
Example:
$ rm -rf /tmp/foo
-------------------------------
rmdir
-------------------------------
rmmod
rmmod [OPTION]... [MODULE]...
Unloads the specified kernel modules from the kernel.
Options:
-a Remove all unused modules (recursively)
Example:
$ rmmod tulip
-------------------------------
route
route [{add|del|delete}]
Edit the kernel's routing tables.
Options:
-n Dont resolve names.
-------------------------------
rpm
rpm -i -q[ildc]p package.rpm
Manipulates RPM packages
Options:
-i Install package
-q Query package
-i Show information
-l List contents
-d List documents
-------------------------------
rpm2cpio
rpm2cpio package.rpm
Outputs a cpio archive of the rpm file.
-------------------------------
run-parts
run-parts [-t] [-a ARG] [-u MASK] DIRECTORY
Run a bunch of scripts in a directory.
Options:
-t Prints what would be run, but does not actually run
anything.
-------------------------------
rx
rx FILE
Receive a file using the xmodem protocol.
Example:
$ rx /tmp/foo
-------------------------------
sed
sed [-efinr] pattern [files...]
Options:
-e script add the script to the commands to be executed
commands to be executed
If no -e or -f is given, the first non-option argument is taken as the sed script to interpret. All
remaining arguments are names of input files; if no input files are specified, then the standard
input is read. Source files will not be modified unless -i option is given.
Example:
$ echo "foo" | sed -e 's/f[a-zA-Z]o/bar/g'
bar
-------------------------------
seq
seq [first [increment]] last
Print numbers from FIRST to LAST, in steps of INCREMENT. FIRST, INCREMENT default
to 1 Arguments:
LAST
FIRST LAST
-------------------------------
setkeycodes
setkeycodes SCANCODE KEYCODE ...
Set entries into the kernel's scancode-to-keycode map, allowing unusual keyboards to generate
usable keycodes.
SCANCODE may be either xx or e0xx (hexadecimal), and KEYCODE is given in decimal
Example:
$ setkeycodes e030 127
-------------------------------
sha1sum
sha1sum [OPTION] [FILEs...] or: sha1sum [OPTION] -c [FILE]
Print or check SHA1 checksums.
Options: With no FILE, or when FILE is -, read standard input.
-c check SHA1 sums against given list
The following two options are useful only when verifying checksums:
-s don't output anything, status code shows success
-------------------------------
sleep
sleep [N]...
Pause for a time equal to the total of the args given,
where each arg can
Example:
$ sleep 2
$ sleep 1d 3h 22m 8s
-------------------------------
sort
sort [-nru] [FILE]...
Sorts lines of text in the specified files
Options:
-u suppress duplicate lines
-n sort numerics
Example:
$ echo -e "e\nf\nb\nd\nc\na" | sort
-------------------------------
start-stop-daemon
start-stop-daemon [OPTIONS] [--start|--stop] ... [-- arguments...]
Program to start and stop services.
Options:
-S|--start start
-K|--stop stop
-q|--quiet be quiet
-------------------------------
strings
strings [-afo] [-n length] [file ... ]
Display printable strings in a binary file.
Options:
-a Scan the whole files (this is the default).
-f Precede each string with the name of the file where it was
found.
-------------------------------
stty
stty [-a|g] [-F DEVICE] [SETTING]...
Without arguments, prints baud rate, line discipline, and deviations from stty sane.
Options:
-F DEVICE open device instead of stdin
-------------------------------
su
su [OPTION]... [-] [username]
Change user id or become root. Options:
-p Preserve environment
-------------------------------
sulogin
sulogin [OPTION]... [tty-device]
Single user login Options:
-f Do not authenticate (user already authenticated)
-p Preserve environment.
-------------------------------
swapoff
swapoff [OPTION] [DEVICE]
Stop swapping virtual memory pages on DEVICE.
Options:
-a Stop swapping on all swap devices
-------------------------------
swapon
swapon [OPTION] [DEVICE]
Start swapping virtual memory pages on DEVICE.
Options:
-a Start swapping on all swap devices
-------------------------------
sync
sync
Write all buffered filesystem blocks to disk.
-------------------------------
sysctl
sysctl [OPTIONS]... [VALUE]...
Example:
sysctl [-n] variable ...
sysctl [-n] -a
sysctl [-n] -A
-------------------------------
syslogd
syslogd [OPTION]...
Linux system and kernel logging utility. Note that this version of syslogd ignores
/etc/syslog.conf.
Options:
-m MIN Minutes between MARK lines (default=20, 0=off)
Example:
$ syslogd -R masterlog:514
$ syslogd -R 192.168.1.1:601
-------------------------------
tail
tail [OPTION]... [FILE]...
Print last 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.
Options:
-c N[kbm] output the last N bytes
If the first character of N (bytes or lines) is a '+', output begins with the Nth item from the start
of each file, otherwise, print the last N items in the file. N bytes may be suffixed by k (x1024),
b (x512), or m (1024^2).
Example:
$ tail -n 1 /etc/resolv.conf
nameserver 10.0.0.1
-------------------------------
tar
tar -[czjZxtvO] [-X FILE][-f TARFILE] [-C DIR] [FILE(s)] ...
Create, extract, or list files from a tar file.
Options:
c create
x extract
t list
File selection:
f name of TARFILE or "-" for stdin
O extract to stdout
Example:
$ zcat /tmp/tarball.tar.gz | tar -xf -
-------------------------------
tee
tee [OPTION]... [FILE]...
Copy standard input to each FILE, and also to standard output.
Options:
-a append to the given FILEs, do not overwrite
Example:
$ echo "Hello" | tee /tmp/foo
$ cat /tmp/foo
Hello
-------------------------------
telnet
telnet HOST [PORT]
Telnet is used to establish interactive communication with another computer over a network
using the TELNET protocol.
-------------------------------
telnetd
telnetd [OPTION]
Telnetd listens for incoming TELNET connections on PORT. Options:
-p PORT listen for connections on PORT (default 23)
-------------------------------
test
test EXPRESSION or [ EXPRESSION ]
Checks file types and compares values returning an exit code determined by the value of
EXPRESSION.
Example:
$ test 1 -eq 2
$ echo $?
$ test 1 -eq 1
$ echo $?
$ [ -d /etc ]
$ echo $?
$ [ -d /junk ]
$ echo $?
-------------------------------
tftp
tftp [OPTION]... HOST [PORT]
Transfers a file from/to a tftp server using ``octet'' mode.
Options:
-l FILE Local FILE.
-g Get file.
-p Put file.
-------------------------------
time
-------------------------------
top
top [-d <seconds>]
top provides an view of processor activity in real time. This utility reads the status for all
processes in /proc each <seconds> and shows the status for however many processes will fit on
the screen. This utility will not show processes that are started after program startup, but it will
show the EXIT status for and PIDs that exit while it is running.
-------------------------------
touch
touch [-c] FILE [FILE ...]
Update the last-modified date on the given FILE[s].
Options:
-c Do not create any files
Example:
$ ls -l /tmp/foo
$ touch /tmp/foo
$ ls -l /tmp/foo
-------------------------------
tr
tr [-cds] STRING1 [STRING2]
Translate, squeeze, and/or delete characters from standard input, writing to standard output.
Options:
-c take complement of STRING1
character
Example:
$ echo "gdkkn vnqkc" | tr [a-y] [b-z]
hello world
-------------------------------
traceroute
-v Verbose output
(default is 33434)
(default is 3)
(default 0)
-w wait Set the time (in seconds) to wait for a response to a probe
(default 3 sec.).
-------------------------------
true
true
Return an exit code of TRUE (0).
Example:
$ true
$ echo $?
-------------------------------
tty
tty
Print the file name of the terminal connected to standard input.
Options:
-s print nothing, only return an exit status
Example:
$ tty
/dev/tty2
-------------------------------
udhcpc
udhcpc [-fbnqv] [-c CLIENTID] [-H HOSTNAME] [-i INTERFACE] [-p pidfile] [-r IP] [-s
script]
-c, --clientid=CLIENTID Client identifier
-------------------------------
udhcpd
udhcpd [configfile]
-------------------------------
umount
umount [flags] FILESYSTEM|DIRECTORY
Unmount file systems
Flags:
-a Unmount all file systems in /etc/mtab
-l Do not free loop device (if a loop device has been used)
Example:
$ umount /dev/hdc1
-------------------------------
uname
uname [OPTION]...
Print certain system information. With no OPTION, same as -s.
Options:
-a print all information
Example:
$ uname -a
Linux debian 2.4.23 #2 Tue Dec 23 17:09:10 MST 2003 i686 GNU/Linux
-------------------------------
uncompress
uncompress [-c] [-f] [ name ... ]
Uncompress .Z file[s] Options:
-c extract to stdout
-------------------------------
uniq
uniq [OPTION]... [INPUT [OUTPUT]]
Discard all but one of successive identical lines from INPUT (or standard input), writing to
OUTPUT (or standard output).
Options:
-c prefix lines by the number of occurrences
Example:
$ echo -e "a\na\nb\nc\nc\na" | sort | uniq
-------------------------------
unix2dos
unix2dos [option] [FILE]
Converts FILE from unix format to dos format. When no option is given, the input is converted
to the opposite output format. When no file is given, uses stdin for input and stdout for output.
Options:
-u output will be in UNIX format
-------------------------------
unzip
unzip [-opts[modifiers]] file[.zip] [list] [-x xlist] [-d exdir]
Extracts files from ZIP archives.
Options:
-l list archive contents (short form)
-q be quiet
-------------------------------
uptime
uptime
Display the time since the last boot.
Example:
$ uptime
-------------------------------
usleep
usleep N
Pause for N microseconds.
Example:
$ usleep 1000000
-------------------------------
uudecode
uudecode [FILE]...
Uudecode a file that is uuencoded.
Options:
-o FILE direct output to FILE
Example:
$ uudecode -o busybox busybox.uu
$ ls -l busybox
-------------------------------
uuencode
uuencode [OPTION] [INFILE] REMOTEFILE
Uuencode a file.
Options:
-m use base64 encoding per RFC1521
Example:
$ uuencode busybox busybox
-------------------------------
vconfig
vconfig COMMAND [OPTIONS] ...
vconfig lets you create and remove virtual ethernet devices.
Options:
add [interface-name] [vlan_id]
rem [vlan-name]
set_name_type [name-type]
-------------------------------
vi
vi [OPTION] [FILE]...
edit FILE.
Options:
-R Read-only- do not write to the file.
-------------------------------
vlock
vlock [OPTIONS]
Lock a virtual terminal. A password is required to unlock Options:
-a Lock all VTs
-------------------------------
watch
watch [-n <seconds>] COMMAND...
Executes a program periodically. Options:
-n Loop period in seconds - default is 2.
Example:
$ watch date
-------------------------------
watchdog
watchdog [-t <seconds>] DEV
Periodically write to watchdog device DEV. Options:
-t Timer period in seconds - default is 30.
-------------------------------
wc
wc [OPTION]... [FILE]...
Print line, word, and byte counts for each FILE, and a total line if more than one FILE is
specified. With no FILE, read standard input.
Options:
-c print the byte counts
Example:
$ wc /etc/passwd
31 46 1365 /etc/passwd
-------------------------------
wget
-------------------------------
which
which [COMMAND ...]
Locates a COMMAND.
Example:
$ which login
/bin/login
-------------------------------
who
who
Prints the current user names and related information
-------------------------------
whoami
whoami
Prints the user name associated with the current effective user id.
-------------------------------
xargs
xargs [COMMAND] [OPTIONS] [ARGS...]
Example:
$ ls | xargs gzip
-------------------------------
yes
yes [OPTION]... [STRING]...
Repeatedly outputs a line with all specified STRING(s), or 'y'.
-------------------------------
zcat
zcat FILE
Uncompress to stdout.
-------------------------------
Please note: The Linux of a DIL/NetPC offers only a subset of all BusyBox commands. Please check
the details with the busybox command. For more information’s about BusyBox and to the current
version please visit the website at http://www.busybox.net/.