All Flashcards

1
Q

DEFAULT

list the common shells

A

bash #The GNU Bourne Again Shell
sh #The Bourne shell upon which bash is based
tcsh #This shell is based on the earlier C shell
csh #The original C shell
ksh #The Korn shell; bourne shell+c shell+extended
zsh #The Z shell takes shell evolution further than the Korn shell

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

DEFAULT

what is an internal command

A

a command that is built into the shell program

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

DEFAULT

what is an external command

A

a command that is not built into the shell program

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

DEFAULT

how do you reverse search for a command in your history

A

ctrl+r

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

DEFAULT

how do you search for a command in your history

A

ctrl+s

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

DEFAULT

how do you terminate a search through your command history

A

ctrl+g

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

DEFAULT

how do you move your shell cursor to the beginning of the line

A

ctrl+a

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

DEFAULT

how do you move your shell cursor to the end of the line

A

ctrl+e

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

DEFAULT

how do you move the shell cursor back one character

A

Ctrl+b

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

DEFAULT

how do you move the shell cursor forward one character

A

Ctrl+f

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

DEFAULT

how do you delete the character under the shell cursor

A

Ctrl+d

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

DEFAULT

how do you delete all text from the shell cursor to the end of the line

A

ctrl+k

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

DEFAULT

how do you delete all of the text from the shell cursor to the beginning of the line

A

Ctrl+x and then Backspace

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

DEFAULT

how do you transpose the character before the cursor with the character under the shell cursor

A

ctrl+t

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

DEFAULT

how do you transpose the two words immediately before (or under) the shell cursor

A

Esc and then t

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

DEFAULT

how do you convert text from the shell cursor to the end of the word to uppercase.

A

Pressing Esc and then u

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

DEFAULT

how do you convert text from the cursor to the end of the word to lowercase

A

Esc and then l

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

DEFAULT
how do you convert the letter under the cursor (or the first letter of the next word) to uppercase; leaving the rest of the word unaffected.

A

Esc and then c

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

DEFAULT

how do you launch a full-fledged editor to edit a command at the shell

A

Ctrl+x followed by Ctrl+e

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

DEFAULT

how do you set an enviornment variable

A

VARNAME=VALUE

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

DEFAULT

how do you save an environment variable across sessions

A

export VARNAME

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

DEFAULT

how do you set and save an environment variable across sessions

A

export VARNAME=VALUE

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

DEFAULT

what is man section 1

A

Executable programs and shell commands

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

DEFAULT

what is man section 2

A

System calls provided by the kernel

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
DEFAULT | what is man section 3
Library calls provided by program libraries
26
DEFAULT | what is man section 4
Device files (usually stored in /dev )
27
DEFAULT | what is man section 5
File formats
28
DEFAULT | what is man section 6
Games
29
DEFAULT | what is man section 7
Miscellaneous (macro packages; conventions; and so on)
30
DEFAULT | what is man section 8
System administration commands (programs run mostly or exclusively by root )
31
DEFAULT | what is man section 9
Kernel routines
32
DEFAULT | what is stdin's file descriptor
0
33
DEFAULT | what is stdout's file descriptor
1
34
DEFAULT | what is stderr's file descriptor
2
35
DEFAULT | how do you specify all numbers and letters in the tr command
[:alnum:]
36
DEFAULT | how do you specify all uppercase letters in the tr command
[:upper:]
37
DEFAULT | how do you specify all lowercase letters in the tr command
[:lower:]
38
DEFAULT | how do you specify all numbers in the tr command
[:digit:]
39
DEFAULT | how do you specify a range of characters in the tr command
You can specify a range of characters by separating them with dashes ( - ); as in A-M
40
DEFAULT | how do you move forward one screen in less
spacebar
41
DEFAULT | how do you move back one screen in less
Esc followed by v
42
DEFAULT | how do you do a search in less
/STRING
43
DEFAULT | how do you do a backward search in less
?STRING
44
DEFAULT | how do you move to the next search result in less
n
45
DEFAULT | how do you move to the previous search result in less
N
46
DEFAULT | how do you go to a specific line in less
gNUMBER
47
DEFAULT | how do you display the help system in less
h
48
DEFAULT | what are the extended regular express characters
? + | ( )
49
DEFAULT | what is the windows newline
/r/n
50
DEFAULT | what is the mac newline
/n
51
DEFAULT | what is the linux newline
/n
52
DEFAULT | how could you use tr to convert from windows to linux format line endings
tr -d \\r < dosfile.txt > unixfile.txt
53
DEFAULT | how could you use sed to convert from linux to windows line endings
sed ""s/$/\r/"" unixfile.txt > dosfile.txt
54
DEFAULT | describe the naming convention of this rpm package: string-a.b.c-x.y.rpm
``` string = Package Name a.b.c = Version Number x = Build Number y = Architecture ```
55
DEFAULT How would you use rpm to install or upgrade package samba-4.1.9-4.fc20.x86_64.rpm from an RPM file that you have already downloaded to your local system
rpm -Uvh samba-4.1.9-4.fc20.x86_64.rpm
56
DEFAULT | how would you query information on the installed package samba using rpm
rpm -qi samba
57
DEFAULT | how would you convert samba-4.1.9-4.fc20.src.rpm to samba-4.1.9-4.fc20.src.cpio
rpm2cpio samba-4.1.9-4.fc20.src.rpm > samba-4.1.9-4.fc20.src.cpio
58
DEFAULT | how would you extract samba-4.1.9-4.fc20.src.cpio
cpio -i --make-directories < samba-4.1.9-4.fc20.src.cpio
59
DEFAULT | how would you extract samba-4.1.9-4.fc20.src.rpm on a system without rpm
rpm2cpio samba-4.1.9-4.fc20.src.rpm | cpio -i --make-directories
60
DEFAULT | how do you install samba_4.1.6+dfsg- 1ubuntu2.1404.3_amd64.deb
dpkg -i samba_4.1.6+dfsg-1ubuntu2.1404.3_amd64.deb
61
DEFAULT | how do you uninstall samba using dpkg
dpkg -r samba
62
DEFAULT | what information is displayed by ps
username; process id; parent process id; tty; cpu time; cpu priority; memory usage; command
63
DEFAULT | how do you send a program to the background
ctrl+z
64
DEFAULT | what is process signal 1 and what does it do
SIGHUP ; which terminates interactive programs and causes many daemons to reread their configuration files
65
DEFAULT | what is process signal 9 and what does it do
SIGKILL ; which causes the process to exit without performing routine shutdown tasks)
66
DEFAULT | what is process signal 15 and what does it do
SIGTERM ; which causes the process to exit but allows it to close open files and so on
67
DEFAULT | what is process signal SIGHUP and what does it do
1 ; which terminates interactive programs and causes many daemons to reread their configuration files
68
DEFAULT | what is process signal SIGHKILL and what does it do
9 ; which causes the process to exit without performing routine shutdown tasks)
69
DEFAULT | what is process signal SIGHTERM and what does it do
15 ; which causes the process to exit but allows it to close open files and so on
70
DEFAULT | what is an interrupt request
a signal sent to the CPU instructing it to suspend its current activity and to handle some external event such as keyboard input
71
DEFAULT | what is IRQ 0
system timer
72
DEFAULT | what is IRQ 1
keyboard
73
DEFAULT | what is IRQ 2
handles IRQ 8-15
74
DEFAULT | what is IRQ 3
COM2
75
DEFAULT | what is IRQ 4
COM1
76
DEFAULT | what is IRQ 5
LPT2 / Sound card
77
DEFAULT | what is IRQ 6
Floppy controller
78
DEFAULT | what is IRQ 7
parallel port
79
DEFAULT | what is IRQ 8
real time clock
80
DEFAULT | what is IRQ 12
ps2 mouse
81
DEFAULT | what is IRQ 13
floating point proc
82
DEFAULT | what is IRQ 14
primary IDE
83
DEFAULT | what is IRQ 15
secondary IDE
84
DEFAULT | what are i/o addresses
unique locations in memory that are reserved for communications between the CPU and specific physical hardware devices
85
DEFAULT | what is direct memory addressing
an alternative method of communication to I/O ports. Rather than have the CPU mediate the transfer of data between a device and memory; DMA permits the device to transfer data directly; without the CPU's attention
86
DEFAULT | how does the BIOS boot process begin
the computer reading a boot sector (typically the first sector) from a disk and then executing that code
87
DEFAULT | how does the EFI boot process begin
the computer reading a boot loader file from a filesystem on a special partition; known as the EFI System Partition (ESP) . This file either can take a special default name or can be registered in the computer's NVRAM
88
DEFAULT | what is the HAL Daemon
The Hardware Abstraction Layer (HAL) Daemon ; or hald ; is a user-space program that runs at all times (that is; as a daemon) and provides other user-space programs with information about available hardware
89
DEFAULT | what is the D-Bus
The Desktop Bus (D-Bus) provides a further abstraction of hardware information access. Like hald ; D-Bus runs as a daemon. D-Bus enables processes to communicate with each other as well as to register to be notified of events; both by other processes and by hardware (such as the availability of a new USB device).
90
DEFAULT | what is mbr partition code 0x0c
fat
91
DEFAULT | what is mbr partition code 0x05
old extended code
92
DEFAULT | what is mbr partition code 0x07
ntfs
93
DEFAULT | what is mbr partition code 0x0f
newer extended code
94
DEFAULT | what is mbr partition code 0x82
linux swap
95
DEFAULT | what is mbr partition code 0x83
linux filesystem
96
DEFAULT | what is mbr partition code 0x8e
LVM
97
DEFAULT | what directories should never be on a seperate partition from /
``` /bin /dev /etc /lib /sbin ```
98
DEFAULT | describe ext2fs
traditional Linux-native filesystem; no journaling
99
DEFAULT | describe ext3fs
ext2 with journaling
100
DEFAULT | describe ext4fs
ext3 with performance and size extensions
101
DEFAULT | describe ReiserFS
designed from scratch as a journaling filesystem for Linux. It's particularly good at handling large numbers of small files (
102
DEFAULT | describe JFS
IBM developed the Journaled File System (JFS) for its AIX OS on mainframe systems and later reimplemented it on its attempt at a workstation OS; called OS/2. After the demise of OS/2; the OS/2 version of JFS was subsequently donated to Linux
103
DEFAULT | describe XFS
Silicon Graphics (SGI) created its Extents File System (XFS) for its IRIX OS and; like IBM; later donated the code to Linux. Like JFS; XFS is a very technically sophisticated filesystem. XFS has gained a reputation for robustness; speed; and flexibility on IRIX; but some of the XFS features that make it so flexible on IRIX aren't supported well under Linux.
104
DEFAULT | describe Btrfs
is an advanced filesystem with features inspired by those of Sun's Zettabyte File System (ZFS).
105
DEFAULT | describe FAT
old and primitive—but ubiquitous. It's the only hard disk filesystem supported by DOS and early versions of Windows (such as the Windows 9 x series and the short-lived Windows Me). For this reason; every major OS understands FAT;
106
DEFAULT | describe NTFS
the preferred filesystem for Windows NT and beyond. Unfortunately; Linux's NTFS support is rather rudimentary. As of the 2.6. x kernel series; Linux can reliably read NTFS and can overwrite existing files; but the Linux kernel can't write new files to an NTFS partition. There are separate drivers outside of the kernel that you can use in Linux to create new files on an NTFS filesystem
107
DEFAULT | describe HFS[+]
Apple has long used the Hierarchical File System (HFS) with its Mac OS; and Linux provides full read/write HFS support. This support isn't as reliable as Linux's read/write FAT support; though; so you may want to use FAT when exchanging files with Mac users.
108
DEFAULT | describe ISO-9660
CD-ROMs; Linux Rock Ridge extensions; Joliet Windows extensions
109
DEFAULT | describe UDF
Universal Disc Format (UDF) is the next-generation filesystem for optical discs. It's commonly used on DVD-ROMs and recordable optical discs. Linux supports it; but read/write UDF support is still in its infancy.
110
DEFAULT | describe the /etc/fstab file format
``` #device mount point filesystem options dump(1 means the dump program should do a dump) fsck(fsck check order, 0 means don't check) e.g. UUID=3631a288-673e-40f5-9e96-6539fec468e9 \ /usr reiserfs defaults 0 0 ```
111
DEFAULT | what does ""credentials=/etc/creds"" in the options column of the /etc/fstab signify
the login credentials(username and password) are stored in /etc/creds
112
DEFAULT | what characters should not be used in filenames
* ? / \ ""
113
DEFAULT | what are the wildcard expansion characters
? * [a-z]
114
DEFAULT | what are the three timestamps on each file
Last file-modification time Last inode change time Last access time
115
DEFAULT | how would you compress ∼/my-work and gzip it into /media/pen/my-work.tgz
tar cvfz /media/pen/my-work.tgz ∼/my-work
116
DEFAULT | what are the file type codes displayed by ls -l
- normal file d directory l symlink p named pipe (A pipe enables two running Linux programs to communicate with each other. One opens the pipe for reading; and the other opens it for writing; enabling data to be transferred between the programs) s socket (similar to a named pipe; but it permits network and bidirectional links) b block device (a file that corresponds to a hardware device to and from which data is transferred in blocks of more than 1 byte. Disk devices (hard disks; USB flash drives; CD-ROMs; and so on)) c character device (a hardware device to and from which data is transferred in units of 1 byte. Examples include parallel port; RS-232 serial port; and audio devices)
117
DEFAULT | what does the directory execution bit do
When a directory's execute bit is set; that means that the directory's contents may be searched
118
DEFAULT | what does the write bit on a directory do
if a user can write to a directory; that user can create; delete; or rename files in the directory as well use the sticky bit to alter this behavior
119
DEFAULT | what are the permissions of a symlink
always 777 | trying to change it's permissions will affect the file it points to
120
DEFAULT | how is set user id represented
4000 SUID s in the owner's execute bit If the SUID bit is set on a file without execution permission set; the permission string appears with a capital S ; as in rwSr-xr-x . However; in this case; SUID will not function and the setting is called benign .
121
DEFAULT | how is set group id represented
2000 SGID s in the group's execute bit f the SGID bit is set on a file without execution permission set; the permission string appears with a capital S ; as in rwsr-Sr-x . Also in this case the setting is benign. SGID is also useful on directories. When the SGID bit is set on a directory; new files or subdirectories created in the original directory will inherit the group ownership of the directory rather than be based on the user's current default group
122
DEFAULT | how is sticky bit represented
1000 t in the world's execute bit When this bit is present on a directory; the directory's files can be deleted only by their owners; the directory's owner; or root
123
DEFAULT | what is a typical default umask
002 or 022
124
DEFAULT | how would you set the permissions of newly created folders to have rwxrxrx permissions symbolically
umask u=rwx,g=rx,o=rx
125
DEFAULT | how would you add user quota support to a mount point in /etc/fstab
/dev/sdc5 /home ext4 usrquota 1 1
126
DEFAULT | how would you add group quota support to a mount point in /etc/fstab
/dev/sdc5 /home ext4 grpquota 1 1
127
DEFAULT | how would you add user and group quota support to a mount point in /etc/fstab
/dev/sdc5 /home ext4 usrquota,grpquota 1 1
128
DEFAULT | what is the old filesystem structure for linux called
FSSTND Filesystem Standard Standardized the programs that reside in /bin and /usr/bin. Specified that executable files shouldn't reside in /etc Removed changeable files from the /usr enabling it to be mounted read-only (a useful security measure).
129
DEFAULT | what is the current filesystem structure
Filesystem Hierarchy Standard (FHS) | Shareable; Unshareable; Static; Variable
130
DEFAULT | what are some static shareable directories in FHS
/usr | /opt
131
DEFAULT | what are some static unshareable folders in FHS
/etc | /boot
132
DEFAULT | what are some variable shareable folders in FHS
/home | /var/mail
133
DEFAULT | what are some variable unshareable folders in FHS
/var/run | /var/lock
134
DEFAULT | what directories are recommended to have their own partition
``` /boot /home /opt /tmp /usr /usr/local /var ```
135
DEFAULT | how does grub legacy start a boot entry
title
136
DEFAULT | how does grub 2 start a boot entry
menuentry
137
DEFAULT | what is the system logger
syslogd writes files to /var/log/messages /var/log/syslog
138
DEFAULT | what are the 3 popular initialization process methods used in linux
Unix System V (also called SysV) Upstart (ubuntu; each service has a configuration file) systemd (redhat) (this is the winner! everyone important is switching to it)
139
DEFAULT | describe runlevel 0
shutdown A transitional runlevel; meaning that it's used to shift the computer from one state to another. Specifically; it shuts down the system. On modern hardware; the computer should completely power down. If not; you're expected to either reboot the computer manually or power it off.
140
DEFAULT | describe runlevel 1
also s or S Single-user mode. What services; if any; are started at this runlevel vary by distribution. It's typically used for low-level system maintenance that may be impaired by normal system operation; such as resizing partitions.
141
DEFAULT | describe runlevel 2
On Debian and its derivatives; a full multi-user mode with X running and a graphical login. Most other distributions leave this runlevel undefined.
142
DEFAULT | describe runlevel 3
On Fedora; Mandriva; Red Hat; and most other distributions; a full multi-user mode with a console (nongraphical) login screen.
143
DEFAULT | describe runlevel 4
Usually undefined by default and therefore available for customization.
144
DEFAULT | describe runlevel 5
On Fedora; Mandriva; Red Hat; and most other distributions; the same behavior as runlevel 3; with the addition of having X run with an XDM (graphical) login.
145
DEFAULT | describe runlevel 6
Used to reboot the system. This runlevel is also a transitional runlevel. Your system is completely shut down; and then the computer reboots automatically.
146
DEFAULT | what is a systemd unit
defines a service or action on the system | eg. mount; service; snapshot
147
DEFAULT | what are the systemd units
``` automount device mount path service snapshot socket target ```
148
COMMANDS | pwd
print the working directory
149
COMMANDS | echo STRING
display text from stdin
150
COMMANDS | time COMMAND
times how long COMMAND takes to execute | Three times are displayed: totalexecution time (aka real time); user CPU time; and system CPU time
151
COMMANDS | set
displays a wide variety of options relating to bash shell operation These options are formatted much like environment variables; but they aren't the same things. You can pass various options to set to have it affect a wide range of shell operations.
152
COMMANDS | exit
terminates any shell Login shells are shell programs that are launched automatically when you initiate a text-mode login as opposed to those that run in xterm windows or other terminal emulators
153
COMMANDS | logout
terminates only login shells Login shells are shell programs that are launched automatically when you initiate a text-mode login as opposed to those that run in xterm windows or other terminal emulators
154
COMMANDS | type COMMAND
tells you how a command you enter will be interpreted—as a built-in command; an external command; an alias; and so on
155
COMMANDS | history
displays all of the commands in the history | typically the latest 500 commands
156
COMMANDS | !!
display and execute the last command in your shell history
157
COMMANDS | !NUMBER
execute command NUMBER from the history
158
COMMANDS | $PATH
a directory list to search when you're entering command or program names
159
COMMANDS | env
display environment variables
160
COMMANDS | unset VARNAME
unset an environment variable
161
COMMANDS | $PS1
the shell prompt
162
COMMANDS | man COMMAND
display the manual for COMMAND
163
COMMANDS | info COMMAND
hypertext formatted manual
164
COMMANDS | help COMMAND
a built in manual for built in commands
165
COMMANDS | >
Creates a new file containing standard output. If the specified file exists; it's overwritten. No file descriptor necessary.
166
COMMANDS | >>
Appends standard output to the existing file. If the specified file doesn't exist; it's created. No file descriptor necessary.
167
COMMANDS | 2>
Creates a new file containing standard error. If the specified file exists; it's overwritten. File descriptor necessary.
168
COMMANDS | 2>>
Appends standard error to the existing file. If the specified file doesn't exist; it's created. File descriptor necessary.
169
COMMANDS | &>
Creates a new file containing both standard output and standard error. If the specified file exists; it's overwritten. No file descriptors necessary.
170
COMMANDS
Sends the contents of the specified file to be used as standard input. No file descriptor necessary.
171
COMMANDS
Accepts text on the following lines as standard input. No file descriptor necessary.
172
COMMANDS | <>
Causes the specified file to be used for both standard input and standard output. No file descriptor necessary.
173
COMMANDS | COMMAND1 | COMMAND2
link stdout from COMMAND1 to stdin of COMMAND2
174
COMMANDS | tee
display stdin on stdout and save it to the specified files
175
COMMANDS | xargs [ options ] [ command [ initial-arguments ]]
run command once for every word passed to it on standard input find / -user Christine | xargs -d "" \ n"" rm
176
COMMANDS | `COMMAND`
a separate command whose results are substituted on the command line rm ` find . / -user Christine `
177
COMMANDS | $(COMMAND)
a separate command whose results are substituted on the command line rm $(find ./ -user Christine)
178
COMMANDS | cat
concatenate files and print on the standard output
179
COMMANDS | tac
concatenate files and print on the standard output in reverse line order
180
COMMANDS | join
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 blanks. Fields are typically space-separated entries on a line
181
COMMANDS | paste
Write lines consisting of the sequentially corresponding lines from each FILE; separated by TABs; to standard output
182
COMMANDS | expand
Convert tabs in each FILE to spaces; writing to standard output. assumes a tab stop every eight characters
183
COMMANDS | od
dump files in octal and other formats
184
COMMANDS | sort
sort lines of text files
185
COMMANDS | split
Output pieces of FILE to PREFIXaa; PREFIXab; ...; default size is 1000 lines; and default PREFIX is 'x'. split -l 2 listing1.1.txt numbers
186
COMMANDS | tr [ options ] SET1 [ SET2 ]
``` Translate; squeeze; and/or delete characters from standard input; writing to standard output tr BCJ bc < listing1.1.txt B is replaced with b C is replaced with c J is replaced with c ```
187
COMMANDS | unexpand
unexpand - convert spaces to tabs | defaults to 8
188
COMMANDS | uniq
report or omit repeated lines
189
COMMANDS | fmt
Reformat each paragraph in the FILE(s); writing to standard output. (default of 75 columns)
190
COMMANDS | nl
number lines of files (non empty) | the similar to ""cat -b"" by default
191
COMMANDS | pr
Paginate or columnate FILE(s) for printing | defaults to 80 columns
192
COMMANDS | head
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.
193
COMMANDS | tail
Print the last 10 lines of each FILE to standard output. With more than one FILE; precede each with a header giving the file name.
194
COMMANDS | less
Less is a program similar to more (1); but it has many more features.
195
COMMANDS | cut
Print selected parts of lines from each FILE to standard output.
196
COMMANDS | wc
Print newline; word; and byte counts for each FILE; and a total line if more than one FILE is specified. A word is a non-zero-length sequence of characters delimited by white space.
197
COMMANDS | grep
searches for PATTERN in each FILE
198
COMMANDS | sed
stream editor for filtering and transforming text sed [ options ] -f script-file [ input-file ] sed [ options ] script-text [ input-file ]
199
COMMANDS | rpm
RPM Package Manager
200
COMMANDS | rpm2cpio
converts the .rpm file specified as a single argument to a cpio archive on standard out. If a '-' argument is given; an rpm stream is read from standard in.
201
COMMANDS | cpio
copy files to and from archives find ./my-work | cpio -o > /media/usb/my-work.cpio cpio -i < /media/usb/my-work.cpio
202
COMMANDS | yum
a repository based rpm manage used by: Red Hat; CentOS; Fedora; and some other RPM-based distributions not usd by: SUSE and Mandriva;
203
COMMANDS | yumdownloader
yumdownloader is a program for downloading RPMs from Yum repositories
204
COMMANDS | kyum
a gui frontend for yum | also yumex
205
COMMANDS | yumex
a gui frontend for yum | also kyum
206
COMMANDS | dpkg
debian's equivelant of rpm
207
COMMANDS | dselect
a high-level interactive package browser. Using it; you can select packages to install on your system from the APT archives defined in /etc/apt/sources.list ; review the packages that are already installed on your system; uninstall packages; and upgrade packages.
208
COMMANDS | apt-get
debian's equivelant of yum
209
COMMANDS | apt-cache
apt-cache performs a variety of operations on APT's package cache. apt-cache does not manipulate the state of the system but does provide operations to search and generate interesting output from the package metadata. The metadata is acquired and updated via the 'update' command of e.g. apt-get; so that it can be outdated if the last update is too long ago; but in exchange apt-cache works independently of the availability of the configured sources (e.g. offline).
210
COMMANDS | aptitude
a text based debian package manager with an optional interactive mode that is similar to dselect
211
COMMANDS | synaptic
a X gui program similar to dselect or aptitude
212
COMMANDS | dpkg-reconfigure
reconfigures packages after they have already been installed. Pass it the names of a package or packages to reconfigure. It will ask configuration questions; much like when the package was first installed.
213
COMMANDS | alien
converts between Red Hat rpm; Debian deb; Stampede slp; Slackware tgz; Solaris pkg; and tarballs requires that you have appropriate package manager software installed—for instance; both RPM and Debian—to convert between these formats When converting from a tarball; alien copies the files directly as they had been in the tarball; so alien works only if the original tarball has files that should be installed off the root ( / ) directory of the system
214
COMMANDS | $LD_LIBRARY_PATH
This environment variable specifies additional directories the system is to search for libraries Does not require ldconfig for changes to take effect
215
COMMANDS | ldd
prints the shared objects (shared libraries) required by each program or shared object specified on the command line.
216
COMMANDS | ldconfig
usually called without any options updates caches and links used by the system for locating libraries—that is; it reads /etc/ld.so.conf and implements any changes in that file or in the directories to which it refers
217
COMMANDS | uname
Print certain system information. With no OPTION; same as -s | node(host) name; kernel name; kernel version; kernel release; machine; processor; hardware platform; os name
218
COMMANDS | ps
ps displays information about a selection of the active processes.
219
COMMANDS | top
provides a dynamic real-time view of a running system
220
COMMANDS | free
displays the total amount of free and used physical and swap memory in the system; as well as the buffers and caches used by the kernel. The information is gathered by parsing /proc/meminfo. T
221
COMMANDS | uptime
gives a one line display of the following information. The current time; how long the system has been running; how many users are currently logged on; and the system load averages for the past 1; 5; and 15 minutes the same information displayed in the header of w
222
COMMANDS | jobs
displays minimal information about the processes associated with the current session
223
COMMANDS | pgrep
looks through the currently running processes and lists the process IDs which match the selection criteria to stdout. pgrep -u root cron
224
COMMANDS | bg
move the specified job to the background, or start the first background process if it is stopped
225
COMMANDS | fg
bring the specified job to the foreground
226
COMMANDS | nice
Run COMMAND with an adjusted niceness (defaults to 10); which affects process scheduling. With no COMMAND; print the current niceness.
227
COMMANDS | renice
renice alters the scheduling priority of one or more running processes. renice 7 16580 -u pdavison tbaker
228
COMMANDS | kill
send a signal to a process The default signal for kill is TERM. used to stop programs
229
COMMANDS | nohup
Run COMMAND; ignoring hangup signals
230
COMMANDS | killall
kill processes by name | killall vi
231
COMMANDS | pkill
allows you to kill one or more processes based on usernames; user IDs; group IDs; and other features as well as using a matching regular expression
232
COMMANDS | setpci
a utility for querying and configuring PCI devices.
233
COMMANDS | lspci
utility for displaying information about PCI buses in the system and devices connected to them
234
COMMANDS | lsmod
a trivial program which nicely formats the contents of the /proc/modules (kernel modules)
235
COMMANDS | insmod
``` a trivial program to insert a module into the kernel. Most users will want to use modprobe(8) instead; which is more clever and can handle module dependencies. e.g. insmod /lib/modules/3.16.6/kernel/drivers/bluetooth/bluetooth.ko ```
236
COMMANDS | modprobe
``` intelligently adds or removes a module from the Linux kernel e.g. modprobe bluetooth ```
237
COMMANDS | rmmod
a trivial program to remove a module (when module unloading support is provided) from the kernel. Most users will want to use modprobe(8) with the -r option instead.
238
COMMANDS | lsusb
a utility for displaying information about USB buses in the system and the devices connected to them
239
COMMANDS | pvcreate
initialize a disk or partition for use by LVM
240
COMMANDS | vgcreate
create a volume group (for LVM)
241
COMMANDS | lvcreate
create a logical volume in an existing volume group (for LVM)
242
COMMANDS | lvscan
scan (all disks) for Logical Volumes (for LVM)
243
COMMANDS | fdisk
a dialog-driven program for creation and manipulation of partition tables. It understands GPT; MBR; Sun; SGI and BSD partition tables. the book says this tool can't do GPT even though it can e.g. fdisk /dev/hda
244
COMMANDS | gdisk
GPT fdisk (aka gdisk) is a text-mode menu-driven program for creation and manipulation of partition tables
245
COMMANDS | mkfs
build a Linux filesystem deprecated in favour of filesystem specific mkfs. utils mkfs -t ext3 /dev/sda6
246
COMMANDS | mkswap
sets up a Linux swap area on a device or in a file | mkswap /dev/sda7
247
COMMANDS | swapon
used to specify devices on which paging and swapping are to take place /dev/sda7
248
COMMANDS | dumpe2fs
dump ext2/ext3/ext4 filesystem information | prints the super block and blocks group information for the filesystem present on device
249
COMMANDS | xfs_info
like dumpe2fs but for xfs; displays filesystem info
250
COMMANDS | xfs_metadump
copies the filesystem's metadata (filenames; file sizes; and so on) to a file
251
COMMANDS | tune2fs
enables you to change many of the filesystem parameters that are reported by dumpe2fs adjust tunable filesystem parameters on ext2/ext3/ext4 filesystems
252
COMMANDS | fsck
check and repair a Linux filesystem
253
COMMANDS | xfs_admin
xfs equivelant to tune2fs | xfs_admin -L av_data /dev/sda7
254
COMMANDS | blkid
display the label and UUID of any partition's filesystem
255
COMMANDS | debugfs
provides the abilities of dumpe2fs ; tune2fs ; and many of Linux's normal file-manipulation tools all rolled into one an interactive file system debugger. It can be used to examine and change the state of an ext2; ext3; or ext4 file system e.g. debugfs /dev/sda11
256
COMMANDS | xfs_db
xfs equivelant to debugfs; only for experts
257
COMMANDS | df
report file system disk space usage
258
COMMANDS | du
estimate file space usage
259
COMMANDS | mount
mount a filesystem | mount /dev/sdb7 /mnt/shared
260
COMMANDS | umount
unmount file systems
261
COMMANDS | ls
list directory contents
262
COMMANDS | cp
make a copy
263
COMMANDS | mv
move (rename) files
264
COMMANDS | rm
remove files or directories
265
COMMANDS | touch
Update the access and modification times of each FILE to the current time
266
COMMANDS | tar
an archiving utility
267
COMMANDS | gzip
compress or expand files; oldest least compression
268
COMMANDS | bzip2
a block-sorting file compressor; improved over gzip
269
COMMANDS | xz
Compress or decompress .xz and .lzma files newest and best compression compared to gzip and bzip2
270
COMMANDS | dd
Copy a file; converting and formatting according to the operands. very low level
271
COMMANDS | ln
make links between files ln [options] source link you can't make hard links to directories
272
COMMANDS | mkdir
make directories
273
COMMANDS | rmdir
remove empty directories
274
COMMANDS | chown
change file owner and group chown [ options ] [ newowner ][: newgroup ] filenames eg. chown sally:skyhook forward.odt Ordinary users may use chown to change the group of files that they own; provided that the users belong to the target group
275
COMMANDS | chmod
change file mode bits (permissions) | chmod [ options ] [ mode [; mode... ]] filename...
276
COMMANDS | umask
sets the bits that will be removed from 777 for directories and 666 for files when a new file/directory is created
277
COMMANDS | newgrp
set the users default group | newgrp mygroup
278
COMMANDS | chattr
change file attributes on a Linux file system
279
COMMANDS | lsattr
display file attributes
280
COMMANDS | quotaon
turn on disk quotas
281
COMMANDS | quotaoff
turn off disk quotas
282
COMMANDS | quotacheck
surveys the filesystem needing quotas and builds current disk usage data records. e.g. create needed files and check the user quota on home: quotacheck -cu /home
283
COMMANDS | edquota
open a text editor to edit quotas
284
COMMANDS | repquota
summarizes the quota information about the filesystem you specify or on all filesystems if you pass it the -a option
285
COMMANDS | quota
display disk usage and limits
286
COMMANDS | find
search for files in a directory hierarchy
287
COMMANDS | locate
reads one or more databases prepared by updatedb(8) and writes file names matching at least one of the PATTERNs
288
COMMANDS | updatedb
creates or updates a database used by locate(1)
289
COMMANDS | whereis
searches for files in a restricted set of locations; such as standard binary file directories; library directories; and man page directories.
290
COMMANDS | which
searches your path for the command that you type and lists the complete path to the first match it finds
291
COMMANDS | grub-install
``` installs grub legacy grub-install /dev/sda grub-install '(hd0)' install to bootsector instead of MBR: /dev/sda1 or (hd0;0) ```
292
COMMANDS | efibootmgr
manipulate the EFI Boot Manager | efibootmgr -c -l \\EFI\\redhat\\grub.efi -L GRUB
293
COMMANDS | update-grub
``` apply changes from /etc/default/grub and /etc/grub.d/ to /boot/grub/grub.cfg or grub-mkconfig some versions output to stdio; if so redirect them to the file /boot/grub/grub.cfg ```
294
COMMANDS | dmesg
``` print or control the kernel ring buffer kernel and module log messages sometimes it's in /var/log/dmesg ```
295
COMMANDS | chkconfig
(SysV) updates and queries runlevel information for system services
296
COMMANDS | runlevel
returns the previous and current runlevel
297
COMMANDS | init
reread the /etc/inittab file and change runlevels
298
COMMANDS | telinit
just like init; but telinit [qQ] will re-read the /etc/inittab
299
COMMANDS | shutdown
shutdown the machine | shutdown -h +15 ""system going down for maintenance""
300
COMMANDS | halt
halt the machine
301
COMMANDS | reboot
reboot the machine
302
COMMANDS | poweroff
poweroff the machine
303
COMMANDS | systemctl
Control the systemd system and service manager
304
COMMANDS | journalctl
Query the systemd journal
305
SWITCHES | type -a
returns all of the places that contain an executable named file
306
SWITCHES | uname -a
show all information
307
SWITCHES | history -c
clear the history
308
SWITCHES | man -k
search man pages for a topic; requires the whatis database to work man -k ""system information""
309
SWITCHES | man #
select the section in the man page to open | man 5 passwd
310
SWITCHES | xargs -d
specify the delimiter | defaults to space
311
SWITCHES | cat -E
display a ""$"" at the end of each line | --show-ends
312
SWITCHES | cat -n
adds line numbers to the beginning of every line. | --number
313
SWITCHES | cat -b
adds line numbers to the beginning of every line that contains text --number-nonblank
314
SWITCHES | cat -s
compresses groups of blank lines down to a single blank line | --squeeze-blank
315
SWITCHES | cat -T
displays tab characters as ""∧I"" | --show-tabs
316
SWITCHES | cat -v
displays most control and other special characters using carat ( ∧ ) and M- notations. --show-nonprinting
317
SWITCHES | join -t CHAR
use CHAR as input and output field separator
318
SWITCHES | join -i
ignore differences in case when comparing fields | --ignore-case
319
SWITCHES | expand -t NUMBER
have tabs NUMBER characters apart; not 8 | --tabs=NUMBER
320
SWITCHES | sort -f
ignore case | --ignore-case; (fold)
321
SWITCHES | sort -M
sort by three-letter month abbreviation ( JAN through DEC ) | --month-sort
322
SWITCHES | sort -n
compare according to string numerical value | --numeric-sort
323
SWITCHES | sort -r
reverse the result of comparisons | --reverse
324
SWITCHES | sort -k KEYDEF
sort via a key; KEYDEF gives location and type --key=KEYDEF (KEYDEF can be two numbered fields separated by commas; to sort on multiple fields.) E.G. sort -k 3 listing1.1.txt
325
SWITCHES | split -b NUMBER
put NUMBER bytes per output file | --bytes=NUMBER
326
SWITCHES | split -C NUMBER
put at most NUMBER bytes of records per output file | --line-bytes=NUMBER
327
SWITCHES | split -l NUMBER
put NUMBER lines/records per output file | --lines=NUMBER
328
SWITCHES | tr -t
first truncate SET1 to length of SET2 | --truncate-set1
329
SWITCHES | tr -d
delete characters in SET1; do not translate | --delete
330
SWITCHES | unexpand -t LIST
use comma separated LIST of tab positions (enables -a) | --tabs=LIST
331
SWITCHES | fmt -w NUMBER
maximum line width (default of 75 columns) | --width=NUMBER
332
SWITCHES | nl -b STYLE
use STYLE for numbering body lines --body-numbering=STYLE STYLE is: t (The default behavior is to number lines that aren't empty. You can make this default explicit by using a style code of t .) a (This style code causes all lines to be numbered; including empty lines.) n (This style code causes all line numbers to be omitted; which may be desirable for headers or footers.) pREGEXP (This option causes only lines that match the specified regular expression ( REGEXP ) to be numbered.)
333
SWITCHES | nl -h STYLE
use STYLE for numbering header lines --header-numbering=STYLE STYLE is: t (The default behavior is to number lines that aren't empty. You can make this default explicit by using a style code of t .) a (This style code causes all lines to be numbered; including empty lines.) n (This style code causes all line numbers to be omitted; which may be desirable for headers or footers.) pREGEXP (This option causes only lines that match the specified regular expression ( REGEXP ) to be numbered.)
334
SWITCHES | nl -f STYLE
use STYLE for numbering footer lines --footer-numbering=STYLE STYLE is: t (The default behavior is to number lines that aren't empty. You can make this default explicit by using a style code of t .) a (This style code causes all lines to be numbered; including empty lines.) n (This style code causes all line numbers to be omitted; which may be desirable for headers or footers.) pREGEXP (This option causes only lines that match the specified regular expression ( REGEXP ) to be numbered.)
335
SWITCHES | nl -d CC
use CC for logical page delimiters | --section-delimiter=CC
336
SWITCHES | nl -n FORMAT
``` insert line numbers according to FORMAT --number-format=FORMAT format is: ln (left justified; no leading zeros); rn (right justified; no leading zeros); rz (right justified with leading zeros). ```
337
SWITCHES | pr -NUMBER
output COLUMN columns and print columns down; unless -a is used --columns=NUMBER default is 80
338
SWITCHES | pr -d
double space the output | --double-space
339
SWITCHES | pr -f
use form feeds instead of newlines to separate pages (by a 3-line page header with -F or a 5-line header and trailer without -F) - -form-feed - F
340
SWITCHES | pr -l NUMBER
set the page length to PAGE_LENGTH (66) lines (default number of lines of text 56; and with -F 63). implies -t if PAGE_LENGTH <= 10 --length=NUMBER
341
SWITCHES | pr -h STRING
use a centered STRING instead of filename in page header; -h """" prints a blank line; don't use -h"""" --header=STRING
342
SWITCHES | pr -t
omit page headers and trailers; implied if PAGE_LENGTH <= 10 | --omit-header
343
SWITCHES | pr -o
offset each line with MARGIN (zero) spaces; do not affect -w or -W; MARGIN will be added to PAGE_WIDTH --indent=NUMBER
344
SWITCHES | pr -w NUMBER
set page width to NUMBER (72) characters for multiple text-column output only; -s[char] turns off (72) --width=NUMBER
345
SWITCHES | head -c NUMBER
print the first NUM bytes of each file; with the leading '-'; print all but the last NUM bytes of each file --bytes=[-]NUMBER
346
SWITCHES | head -n NUMBER
print the first NUM lines instead of the first 10; with the leading '-'; print all but the last NUM lines of each file --lines=[-]NUMBER
347
SWITCHES | tail -c NUMBER
output the last NUMBER bytes; or use -c +NUMBER to output starting with byte NUMBER of each file --bytes=[+]NUMBER
348
SWITCHES | tail -n NUMBER
output the last NUM lines; instead of the last 10; or use -n +NUM to output starting with line NUM --lines=[+]NUMBER
349
SWITCHES | tail -f
output appended data as the file grows; | --follow[={name|descriptor}]
350
SWITCHES | tail --pid=NUMBER
with -f; terminate after process ID; PID dies
351
SWITCHES | cut -b LIST
select only these bytes --bytes=LIST LIST can be a single number (such as 4 ); a closed range of numbers (such as 2-4 ); or an open range of numbers (such as -4 or 4- ).
352
SWITCHES | cut -c LIST
select only these characters --characters=LIST LIST can be a single number (such as 4 ); a closed range of numbers (such as 2-4 ); or an open range of numbers (such as -4 or 4- ).
353
SWITCHES | cut -f LIST
select only these fields; also print any line that contains no delimiter character; unless the -s option is specified --fields=LIST LIST can be a single number (such as 4 ); a closed range of numbers (such as 2-4 ); or an open range of numbers (such as -4 or 4- ).
354
SWITCHES | cut -d STRING
use DELIM instead of TAB for field delimiter | --delimiter=STRING
355
SWITCHES | cut -s
do not print lines not containing delimiters | --only-delimited
356
SWITCHES | wc -l
print the newline counts | --lines
357
SWITCHES | wc -w
print the word counts | --words
358
SWITCHES | wc -c
print the byte counts | --bytes
359
SWITCHES | wc -m
print the character counts | --chars
360
SWITCHES | wc -L
print the maximum display width | --max-line-length
361
SWITCHES | grep -c
Suppress normal output; instead print a count of matching lines for each input file. With the -v; --invert-match option (see below); count non-matching lines. --count
362
SWITCHES | grep -f STRING
Obtain patterns from file STRING; one per line. If this option is used multiple times or is combined with the -e (--regexp) option; search for all patterns given. The empty file contains zero patterns; and therefore matches nothing. --file=STRING
363
SWITCHES | grep -i
Ignore case distinctions; so that characters that differ only in case match each other. --ignore-case
364
SWITCHES | grep -r
Read all files under each directory; recursively; following symbolic links only if they are on the command line. Note that if no file operand is given; grep searches the working directory. This is equivalent to the -d recurse option. --recursive or use rgrep
365
SWITCHES | grep -F
Interpret PATTERN as a list of fixed strings (instead of regular expressions); separated by newlines; any of which is to be matched. --fixed-strings or use fgrep
366
SWITCHES | grep -E
Interpret PATTERN as an extended regular expression (ERE; see below). --extended-regexp or use egrep
367
SWITCHES | sed =
Display the current line number
368
SWITCHES | sed a\text
Append text to the file.
369
SWITCHES | sed i\text
Insert text into the file
370
SWITCHES | sed r filename
Append text from filename into the file
371
SWITCHES | sed c\text
Replace the selected range of lines with the provided text
372
SWITCHES | sed s/regexp/replacement/[g]
Replace text that matches the regular expression ( regexp ) with replacement
373
SWITCHES | sed w filename
Write the current pattern space to the specified file.
374
SWITCHES | sed q
Immediately quit the script; but print the current pattern space.
375
SWITCHES | sed Q
Immediately quit the script.
376
SWITCHES | rpm --root STRING
Modifies the Linux system having a root directory located at dir . This option can be used to maintain one Linux installation discrete from another one (say; during OS installation or emergency maintenance).
377
SWITCHES | rpm --force
Forces installation of a package even when it means overwriting existing files or packages. used with: -i ; -U ; -F
378
SWITCHES | rpm -h
Displays a series of hash marks ( # ) to indicate the progress of the operation. --hash used with: -i ; -U ; -F
379
SWITCHES | rpm -v
Used in conjunction with the -h option to produce a uniform number of hash marks for each package. used with: -i ; -U ; -F
380
SWITCHES | rpm --nodeps
Specifies that no dependency checks be performed. Installs or removes the package even if it relies on a package or file that's not present or is required by a package that's not being uninstalled. used wih: -i ; -U ; -F ; -e
381
SWITCHES | rpm --test
Checks for dependencies; conflicts; and other problems without actually installing the package. used with: -i ; -U ; -F
382
SWITCHES | rpm --prefix STRING
Sets the installation directory to STRING (works only for some packages). used with: -i ; -U ; -F
383
SWITCHES | rpm -a
Queries or verifies all packages. --all used with: -q ; -V
384
SWITCHES | rpm -f STRING
Queries or verifies the package that owns file --file STRING used with: -q ; -V
385
SWITCHES | rpm -p STRING
Queries the uninstalled RPM STRING | used with -q
386
SWITCHES | rpm -i
Displays package information; including the package maintainer; a short description; and so on used with -q
387
SWITCHES | rpm -R
Displays the packages and files on which this one depends --requires used with -q
388
SWITCHES | rpm -l
Displays the files contained in the package. --list used with -q
389
SWITCHES | rpm -i
Installs a package; system must not contain a package of the same name
390
SWITCHES | rpm -U
Installs a new package or upgrades an existing one
391
SWITCHES | rpm -F
Upgrades a package only if an earlier version already exists | --freshen
392
SWITCHES | rpm -q
Queries a package—finds whether a package is installed; what files it contains; and so on
393
SWITCHES | rpm -v
Verifies a package—checks that its files are present and unchanged since installation --verify
394
SWITCHES | rpm -e
Uninstalls a package
395
SWITCHES | rpm -b
Builds a binary package; given source code and configuration files; moved to the rpmbuild program with RPM version 4.2
396
SWITCHES | rpm --rebuild
Builds a binary package; given a source RPM file; moved to the rpmbuild program with RPM version 4.2
397
SWITCHES | rpm --rebuilddb
Rebuilds the RPM database to fix errors
398
SWITCHES | cpio -i
extract an archive
399
SWITCHES | cpio --make-directories
create directories
400
SWITCHES | yum install
Installs one or more packages by package name. Also installs dependencies of the specified package or packages.
401
SWITCHES | yum update
Updates the specified package or packages to the latest available version. If no packages are specified; yum updates every installed package.
402
SWITCHES | yum check-update
Checks to see whether updates are available. If they are; yum displays their names; versions; and repository area ( updates or extras ; for instance).
403
SWITCHES | yum upgrade
Works like update with the --obsoletes flag set; which handles obsolete packages in a way that's superior when performing a distribution version upgrade
404
SWITCHES | yum remove
Deletes a package from the system; similar to rpm -e ; but yum also removes depended-on packages or erase
405
SWITCHES | yum list
Displays information about a package; such as the installed version and whether an update is available
406
SWITCHES | yum provides
Displays information about packages that provide a specified program or feature. For instance; typing yum provides samba lists all the Samba-related packages; including every available update. Note that the output can be copious. or whatprovides
407
SWITCHES | yum search
Searches package names; summaries; packagers; and descriptions for a specified keyword. This is useful if you don't know a package's name but can think of a word that's likely to appear in one of these fields but not in these fields for other packages
408
SWITCHES | yum info
Displays information about a package; similar to the rpm -qi command
409
SWITCHES | yum clean
Cleans up the Yum cache directory. Running this command from time to time is advisable; lest downloaded packages chew up too much disk space.
410
SWITCHES | yum shell
Enters the Yum shell mode; in which you can enter multiple Yum commands one after another
411
SWITCHES | yum resolvedep
Displays packages matching the specified dependency.
412
SWITCHES | yum localinstall
Installs the specified local RPM files; using your Yum repositories to resolve dependencies
413
SWITCHES | yum localupdate
Updates the system using the specified local RPM files; using your Yum repositories to resolve dependencies. Packages other than those updated by local files and their dependencies are not updated
414
SWITCHES | yum deplist
Displays dependencies of the specified package.
415
SWITCHES | dpkg -i
Installs a package | --install
416
SWITCHES | dpkg --configure
Reconfigures an installed package: runs the post-installation script to set site-specific options
417
SWITCHES | dpkg -r
Removes a package but leaves configuration files intact | --remove
418
SWITCHES | dpkg -P
Removes a package; including configuration files | --purge
419
SWITCHES | dpkg --get-selections
Displays currently installed packages
420
SWITCHES | dpkg -p
Displays information about an installed package | --print-avail
421
SWITCHES | dpkg -I
Displays information about an uninstalled package file | --info
422
SWITCHES | dpkg -l STRING
Lists all installed packages whose names match pattern | --list pattern
423
SWITCHES | dpkg -L
Lists the installed files associated with a package | --listfiles
424
SWITCHES | dpkg -S STRING
Locates the package(s) that own the file(s) specified by pattern --search pattern
425
SWITCHES | dpkg -c
pattern -C or --audit Searches for partially installed packages and suggests what to do with them --audit
426
SWITCHES | dpkg --root=STRING
Modifies the Linux system using a root directory located at STRING . Can be used to maintain one Linux installation discrete from another one; say during OS installation or emergency maintenance. used with: all
427
SWITCHES | dpkg -B
Disables packages that rely on one that is being removed. --auto-deconfigure used with -r
428
SWITCHES | dpkg --force-things
Overrides defaults that would ordinarily cause dpkg to abort. Consult the dpkg man page for details of what (specified by things ) this option does. used with: assorted
429
SWITCHES | dpkg --ignore-depends=package
ignores dependency information for the specified package | used with: -i; -r
430
SWITCHES | dpkg --no-act
Checks for dependencies; conflicts; and other problems without actually installing or removing the package used with: -i; -r
431
SWITCHES | dpkg --recursive
Installs all packages that match the package-name wildcard in the specified directory and all subdirectories used with: -i
432
SWITCHES | dpkg -G
Doesn't install the package if a newer version of the same package is already installed. used with: -i
433
SWITCHES | dpkg -E
Doesn't install the package if the same version of the package is already installed. --skip-same-version used with: -i
434
SWITCHES | apt-cache showpkg
displays information about the packages listed on the command line. eg: apt-cache showpkg samba
435
SWITCHES | apt-cache stats
You can learn how many packages you've installed; how many dependencies are recorded; and various other statistics about the package database
436
SWITCHES | apt-cache unmet
Find Unmet Dependencies
437
SWITCHES | apt-cache depends
Display Dependencies
438
SWITCHES | apt-cache pkgnames
Locate All Packages If you include a second parameter; as in apt-cache pkgnames sa ; the program returns only those packages that begin with the specified string.
439
SWITCHES | apt-get -d
Downloads package files but doesn't install them. --download-only used with: upgrade ; dselect- upgrade ; install ; source
440
SWITCHES | apt-get -f
Attempts to fix a system on which dependencies are unsatisfied. --fix-broken used with: install ; remove
441
SWITCHES | apt-get -m
Ignores all package files that can't be retrieved (because of network errors; missing files; or the like) --ignore-missing ; or --fix-missing used with: upgrade ; dselect- upgrade ; install ; remove ; source
442
SWITCHES | apt-get -q
Omits some progress indicator information. May be doubled (for instance; -qq ) to produce still less progress information --quiet used with: all
443
SWITCHES | apt-get -s
Performs a simulation of the action without actually modifying; installing; or removing files --simulate ; --just- print ; --dry-run ; -- recon ; or --no-act used with: all
444
SWITCHES | apt-get -y
Produces a ""yes'' response to any yes/no prompt in installation scripts. --yes ; or --assume- yes used with: all
445
SWITCHES | apt-get -b
Compiles a source package after retrieving it. --compile; or --build used with: source
446
SWITCHES | apt-get --no-upgrade
auses apt-get to not upgrade a package if an older version is already installed. used with: install
447
SWITCHES | apt-get update
Obtains updated information about packages available from the installation sources listed in /etc/apt/sources.list .
448
SWITCHES | apt-get upgrade
Upgrades all installed packages to the newest versions available; based on locally stored information about available packages.
449
SWITCHES | apt-get dselect-upgrade
Performs any changes in package status (installation; removal; and so on) left undone after running dselect .
450
SWITCHES | apt-get dist-upgrade
Similar to upgrade ; but performs ``smart'' conflict resolution to avoid upgrading a package if doing so would break a dependency.
451
SWITCHES | apt-get install
Installs a package by package name (not by package filename); obtaining the package from the source that contains the most up-to-date version.
452
SWITCHES | apt-get remove
Removes a specified package by package name
453
SWITCHES | apt-get source
Retrieves the newest available source package file by package filename using information about available packages and installation archives listed in /etc/apt/sources.list
454
SWITCHES | apt-get check
Checks the package database for consistency and broken package installations
455
SWITCHES | apt-get clean
Performs housekeeping to help clear out information about retrieved files from the Debian package database. If you don't use dselect for package management; run this from time to time in order to save disk space.
456
SWITCHES | apt-get autoclean
Similar to clean ; but removes information only about packages that can no longer be downloaded.
457
SWITCHES | aptitude install STRING
install package STRING
458
SWITCHES | aptitude install STRING-
uninstall package STRING | also remove STRING
459
SWITCHES | aptitude remove STRING
uninstall package STRING | also install STRING-
460
SWITCHES | aptitude full-upgrade
less conservative about removing packages in the upgrade process; and so it is more likely to complete its tasks. However; it may break software in the process.
461
SWITCHES | aptitude safe-upgrade
conservative about removing packages or installing new ones and so may fail
462
SWITCHES | aptitude search
earches the database for packages matching the specified name
463
SWITCHES | aptitude autoclean
removes already-downloaded packages that are no longer available
464
SWITCHES | aptitude clean
removes all downloaded packages
465
SWITCHES | aptitude help
displays a complete list of options.
466
SWITCHES | alien --to-deb
converts to debian
467
SWITCHES | alien --to-rpm
converts to rpm
468
SWITCHES | alien --to-tgz
converts to tgz
469
SWITCHES | ldconfig -v
Display Verbose Information
470
SWITCHES | ldconfig -N
causes ldconfig not to perform its primary duty of updating the library cache. It will; though; update symbolic links to libraries; which is a secondary duty of this program.
471
SWITCHES | ldconfig -n
causes ldconfig to update the links contained in the directories specified on the command line. The system won't examine the directories specified in /etc/ld.so.conf or the trusted directories ( /lib and /usr/lib )
472
SWITCHES | ldconfig -X
the opposite of -N ; it causes ldconfig to update the cache but not manage links.
473
SWITCHES | ldconfig -f STRING
change the configuration file from /etc/ld.so.conf to STRING
474
SWITCHES | ldconfig -C STRING
change the cache file that ldconfig creates to STRING
475
SWITCHES | ldconfig -r STRING
tells ldconfig to treat dir as if it were the root ( / ) directory. This option is helpful when you're recovering a badly corrupted system or installing a new OS
476
SWITCHES | ldconfig -p
Causes ldconfig to display the current cache—all of the library directories and the libraries they contain
477
SWITCHES | uname -a
display all information
478
SWITCHES | uname -n
displays the system's node name; that is; its network hostname. --nodename
479
SWITCHES | uname -s
displays the kernel name; which is Linux on a Linux system | --kernel-name
480
SWITCHES | uname -v
find the kernel version | --kernel-version
481
SWITCHES | uname -r
The actual kernel version number | --kernel-release
482
SWITCHES | uname -m
returns information about your machine. This is likely to be a CPU code; such as i686 or x86_64 . --machine
483
SWITCHES | uname -p
may return information about your CPU; such as the manufacturer; model; and clock speed; in practice; it returns unknown on many systems --processor
484
SWITCHES | uname -i
theoretically returns hardware platform information; this option often returns unknown --hardware-platform
485
SWITCHES | uname -o
returns the OS name—normally GNU/Linux for a Linux system | --operating-system
486
SWITCHES | ps --help
Display Help
487
SWITCHES | ps -A
Display All Processes | also -e
488
SWITCHES | ps -e
Display All Processes | also -A
489
SWITCHES | ps x
Lift the BSD-style ""must have a tty"" restriction; | displays all processes owned by the user who gives the command
490
SWITCHES | ps -u STRING
display processes owned by user STRING --User user also U STRING STRING may be a user name or uid
491
SWITCHES | ps U STRING
display processes owned by user STRING --User user also U STRING STRING may be a user name or uid
492
SWITCHES | ps -H
Display Process Hierarchy --forest also -f
493
SWITCHES | ps -f
Display Process Hierarchy --forest also -f
494
SWITCHES | ps -w
don't truncate output at 80 columns | also w
495
SWITCHES | top -d NUMBER
how often top updates | defaults to 5 seconds
496
SWITCHES | top -p NUMBER
only display the listed processes NUMBER is a pid up to 20 pids can be listed
497
SWITCHES | top -n NUMBER
display NUMBER updates then quit
498
SWITCHES | top -b
specifies batch mode; in which top doesn't use the normal screen-update commands. You might use this to log CPU use of targeted programs to a file; for instance
499
SWITCHES | top h while running
display help | also ?
500
SWITCHES | top k while running
kill a process
501
SWITCHES | top q while running
quit
502
SWITCHES | top r while running
change a process's priority
503
SWITCHES | top s while running
changes the display's update rate
504
SWITCHES | top P while running
sets the display to sort by CPU usage; which is the default
505
SWITCHES | top M while running
change the display to sort by memory usage with this command
506
SWITCHES | nice -n NUMBER
run the program with NUMBER niceness also -NUMBER --adjustment=NUMBER
507
SWITCHES | nice -NUMBER
run the program with NUMBER niceness also -n NUMBER --adjustment=NUMBER
508
SWITCHES | renice [-n] NUMBER
Specify the scheduling priority to be used for the process; process group; or user. --priority NUMBER
509
SWITCHES | renice -p NUMBER
change niceness on the pid NUMBER
510
SWITCHES | renice -g NUMBER
change niceness on the gid NUMBER
511
SWITCHES | renice -u NUMBER
change niceness on the uid NUMBER | e.g. renice 7 16580 -u pdavison tbaker
512
SWITCHES | kill -l
List signal names
513
SWITCHES | kill -s STRING
specify the signal to send | common signals are 1(SIGHUP); 9(SIGKILL); 15(SIGTERM)
514
SWITCHES | killall -i
Interactively ask for confirmation before killing | --interactive
515
SWITCHES | lspci -v
Increases verbosity of output. | This option may be doubled ( -vv ) or tripled ( -vvv ) to produce yet more output
516
SWITCHES | lspci -n
Displays information in numeric codes rather than translating the codes to manufacturer and device names.
517
SWITCHES | lspci -nn
Displays both the manufacturer and device names and their associated numeric codes
518
SWITCHES | lspci -x
Displays the PCI configuration space for each device as a hexadecimal dump. This is an extremely advanced option. Tripling ( -xxx ) or quadrupling ( -xxxx ) this option displays information about more devices
519
SWITCHES | lspci -b
hows IRQ numbers and other data as seen by devices rather than as seen by the kernel
520
SWITCHES | lspci -t
Displays a tree view depicting the relationship between devices
521
SWITCHES | lspci -s STRING
Displays only devices that match the listed specification. This can be used to trim the results of the output -s [[[[ domain ]:] bus ]:] [ slot ][.[ func ]]
522
SWITCHES | lspci -d STRING
Shows data on the specified device. | -d [ vendor ]: [ device ]
523
SWITCHES | lspci -i STRING
Uses the specified file to map vendor and device IDs to names. (The default is /usr/share/misc/pci.ids .)
524
SWITCHES | lspci -m
Dumps data in a machine-readable form intended for use by scripts. A single -m uses a backward-compatible format; whereas doubling ( - mm ) uses a newer format
525
SWITCHES | lspci -D
Displays PCI domain numbers. These numbers normally aren't displayed.
526
SWITCHES | lspci -M
Performs a scan in bus-mapping mode; which can reveal devices hidden behind a misconfigured PCI bridge. This is an advanced option that can be used only by root .
527
SWITCHES | lspci --version
Displays version information.
528
SWITCHES | modprobe -v
display extra information | --verbose
529
SWITCHES | modprobe -C STRING
This option overrides the default configuration directory (/etc/modprobe.d) --config
530
SWITCHES | modprobe -n
This option does everything but actually insert or delete the modules --dry-run useful when combined with -v
531
SWITCHES | modprobe -r
``` Reverses modprobe 's usual effect; it causes the program to remove the specified module and any on which it depends --remove ```
532
SWITCHES | modprobe -f
``` force the module loading even if the kernel version doesn't match what the module expects. This action is potentially dangerous --force ```
533
SWITCHES | modprobe --show-depends
shows all of the modules on which the specified module depends
534
SWITCHES | modprobe -l STRING
displays a list of available options whose names match the wildcard you specify - -list eg. modprobe -l v* displays all modules whose names begin with v
535
SWITCHES | rmmod -v
display some extra information about what it's doing | --verbose
536
SWITCHES | rmmod -f
``` forces module removal even if the module is marked as being in use. Naturally; this is a very dangerous option; --force ```
537
SWITCHES | rmmod -w
``` wait for the module to become unused rather than return an error message if the module is in use. Once the module is no longer being used (say; after a bluetooth device is disconnected); rmmod unloads the module and returns --wait ```
538
SWITCHES | lsusb -v
display more information
539
SWITCHES | lsusb -s STRING
restricts output to the specified bus and device number. | -s [[ bus ]:][ devnum ]
540
SWITCHES | lsusb -d STRING
restrict output to a particular vendor and product | -d [ vendor ]: [ product ]
541
SWITCHES | lsusb -D STRING
displays information about the device that's accessible via filename ; which should be a file in the /proc/bus/usb directory tree
542
SWITCHES | lsusb -t
displays the device list as a tree so that you can see what devices are connected to specific controllers more easily
543
SWITCHES | lsusb -V
displays the version of the lsusb utility | --version
544
SWITCHES | fdisk -l
display the current partition table
545
SWITCHES | fdisk d while running
delete a partition
546
SWITCHES | fdisk m while running
display help | also ?
547
SWITCHES | fdisk t while running
change the partition type code
548
SWITCHES | fdisk l while running
display common partition type codes
549
SWITCHES | fdisk a while running
set the bootable flag
550
SWITCHES | fdisk q while running
exit
551
SWITCHES | fdisk w while running
save changes and exit
552
SWITCHES | gdisk print while running
display existing partitions
553
SWITCHES | mkfs -m NUMBER
sets the reserved-space percentage to NUMBER
554
SWITCHES | tune2fs -c NUMBER
Adjust the number of mounts after which the filesystem will be checked by e2fsck
555
SWITCHES | tune2fs -i NUMBER
Adjust the maximal time between two filesystem checks. No suffix or d will interpret the number interval-between-checks as days; m as months; and w as weeks. A value of zero will disable the time-dependent checking.
556
SWITCHES | tune2fs -j
converts ext2 to ext3
557
SWITCHES | tune2fs -r NUMBER
sets the reserved-space blocks to NUMBER
558
SWITCHES | xfs_admin -j
enable version 2 log (journal) format
559
SWITCHES | xfs_admin -l
obtain the filesystem's label (name)
560
SWITCHES | xfs_admin -u
obtain the filesystem's uuid
561
SWITCHES | xfs_admin -L STRING
set the filesystem's label (name)
562
SWITCHES | xfs_admin -U STRING
set the filesystem's uuid
563
SWITCHES | debugfs show_super_stats while running
produces superblock information; similar to what dumpe2fs displays also stats
564
SWITCHES | debugfs stat STRING (while running)
display the inode data on a file or directory | STRING is the name of a file or directorhy
565
SWITCHES | debugfs undelete NUMBER STRING (while running)
undelete a file also undel NUMBER is the inode number and STRING is the name you want to give i
566
``` SWITCHES debugfs lsdel (while running) ```
obtain a list of deleted inodes | also list_deleted_inodes
567
SWITCHES | debugfs write STRING1 STRING2 (while running)
extract a file from the filesystem STRING1 is the name of a file in the filesystem that you're manipulating and STRING2 is a filename on your main Linux system.
568
``` SWITCHES debugfs list_requests (while running) ```
produces a summary of available commands | also lr; help; or ?
569
SWITCHES | debugfs quit
exit the program
570
SWITCHES | fsck -A
check all of the filesystems marked to be checked in /etc/fstab .
571
SWITCHES | fsck -c
displays a text-mode progress indicator of the check process
572
SWITCHES | fsck -v
produces verbose output of the check process
573
SWITCHES | fsck -N
display what it would normally do without actually doing it
574
SWITCHES | fsck -t STRING
causes the program to check only the specified filesystem types; even if others are marked to be checked used with -A If STRING is prefixed with no ; then all filesystems except the specified type are checked
575
SWITCHES | fsck --STRING
passes STRING to the underlying check program
576
SWITCHES | df -a
includes pseudo-filesystems with a size of 0 in the output. These filesystems may include /proc ; /sys ; /proc/bus/usb ; and others --all
577
SWITCHES | df -h
scale and label its units | --human-readable
578
SWITCHES | df -H
scale and label its units using powers of 10 | --si
579
SWITCHES | df -k
scale and label its units using kilobytes | --kilobytes
580
SWITCHES | df -m
scale and label its units using megabytes | --megabytes
581
SWITCHES | df -i
report on available and used inodes | --inodes
582
SWITCHES | df -l
omit network filesystems | --local
583
SWITCHES | df -T
display filesystem type | --print
584
SWITCHES | df -t STRING
displays only information about filesystems of the specified type --type=STRING
585
SWITCHES | df -x STRING
don't display information about filesystems of the specified type --exclude=STRING
586
SWITCHES | du -a
report on individual files as well. | --all
587
SWITCHES | du -c
add a grand total to the end of its output | --total
588
SWITCHES | du -h
scale and label its units; | --human-readable
589
SWITCHES | du -H
scale and label its units using powers of 10 | --si
590
SWITCHES | du -k
scale and label its units using kilobytes | --kilobytes
591
SWITCHES | du -m
scale and label its units using megabytes | --megabytes
592
SWITCHES | du -l
count the space each hardlink takes (useful if you want to burn to optical storage) --count-links
593
SWITCHES | du --max-depth=NUMBER
limits the report to NUMBER levels
594
SWITCHES | du -s
equivalent to --max=depth=0 | --summarize
595
SWITCHES | du -x
limits the report to the current filesystem. If another filesystem is mounted within the tree that you want summarized; its contents aren't included in the report --one-file-system
596
SWITCHES | mount -a
mount all of the filesystems listed in the /etc/fstab
597
SWITCHES | mount -r
mount the filesystem read-only
598
SWITCHES | mount -v
produces verbose output
599
SWITCHES | mount -w
mount the filesystem for both read and write | also: -o rw
600
SWITCHES | mount -t STRING
specify the filesystem type
601
SWITCHES | mount -L STRING
mount the filesystem whose label matches STRING
602
SWITCHES | mount -U STRING
mount the filesystem whose UUID matches STRING
603
SWITCHES | mount -o defaults
Causes the default options for this filesystem to be used. It's used primarily in the /etc/fstab file to ensure that the file includes an options column supported filesystems: all
604
SWITCHES | mount -o loop
Causes the loopback device for this mount to be used. Allows you to mount a file as if it were a disk partition. For instance; mount -t vfat -o loop image.img /mnt/image mounts the file image.img as if it were a disk supported filesystems: all
605
SWITCHES | mount -o auto or noauto
Mounts or doesn't mount the filesystem at boot time or when root issues the mount -a command. The default is auto ; but noauto is appropriate for removable media. Used in /etc/fstab supported filesystems: all
606
SWITCHES | mount -o user or nouser
Allows or disallows ordinary users to mount the filesystem. The default is nouser ; but user is often appropriate for removable media. Used in /etc/fstab . When included in this file; user allows users to type mount /mountpoint (where / mountpoint is the assigned mount point) to mount a disk. Only the user who mounted the filesystem may unmount it. supported filesystems: all
607
SWITCHES | mount -o users
Similar to user ; except that any user may unmount a filesystem once it's been mounted. supported filesystems: all
608
SWITCHES | mount -o owner
Similar to user ; except that the user must own the device file. Some distributions; such as Red Hat; assign ownership of some device files (such as /dev/fd0 for the floppy disk) to the console user; so this can be a helpful option supported filesystems: all
609
SWITCHES | mount -o remount
Changes one or more mount options without explicitly unmounting a partition. To use this option; you issue a mount command on an already-mounted filesystem but with remount along with any options that you want to change. This feature can be used to enable or disable write access to a partition; for example supported filesystems: all
610
SWITCHES | mount -o ro
Specifies a read-only mount of the filesystem. This is the default for filesystems that include no write access and for some with particularly unreliable write support supported filesystems: all
611
SWITCHES | mount -o rw
Specifies a read/write mount of the filesystem. This is the default for most read/write filesystems supported filesystems: All read/write filesystems
612
SWITCHES | mount -o uid=NUMBER
Sets the owner of all files. For instance; uid=1000 sets the owner to whomever has Linux user ID 1000. (Check Linux user IDs in the /etc/passwd file.) supported filesystmes: Most filesystems that don't support Unix-style permissions; such as vfat ; hpfs ; ntfs ; and hfs
613
SWITCHES | mount -o gid=value
Works like uid= value ; but sets the group of all files on the filesystem. You can find group IDs in the /etc/group file supported filesystems: Most filesystems that don't support Unix-style permissions; such as vfat ; hpfs ; ntfs ; and hfs
614
SWITCHES | mount -o umask=value
Sets the umask for the permissions on files. value is interpreted in binary as bits to be removed from permissions on files. For instance; umask=027 yields permissions of 750; or –rwxr-x--- . Used in conjunction with uid= value and gid= value ; this option lets you control who can access files on FAT; HPFS; and many other foreign filesystems. supported filesystems: Most filesystems that don't support Unix-style permissions; such as vfat ; hpfs ; ntfs ; and hfs
615
SWITCHES | mount -o dmask=value
Similar to umask ; but sets the umask for directories only; not for files. supported filesystems: Most filesystems that don't support Unix-style permissions; such as vfat ; hpfs ; ntfs ; and hfs
616
SWITCHES | mount -o fmask=value
Similar to umask ; but sets the umask for files only; not for directories. supported filesystems: Most filesystems that don't support Unix-style permissions; such as vfat ; hpfs ; ntfs ; and hfs
617
SWITCHES | mount -o conv=code
If code is b or binary ; Linux doesn't modify the files' contents. If code is t or text ; Linux auto-converts files between Linux-style and Windows- or Macintosh-style end-of-line characters. If code is a or auto ; Linux applies the conversion unless the file is a known binary file format. It's usually best to leave this at its default value of binary because file conversions can cause serious problems for some applications and file types. supported filesystems: Most filesystems used on Microsoft and Apple OSs: msdos ; umsdos ; vfat ; hpfs ; and hfs
618
SWITCHES | mount -o norock
Disables Rock Ridge extensions for ISO-9660 CD-ROMs. | supported filesystems: iso9660
619
SWITCHES | mount -o nojoliet
Disables Joliet extensions for ISO-9660 CD-ROMs. | supported filesystems: iso9660
620
SWITCHES | umount -a
attempt to unmount all of the partitions listed in /etc/mtab
621
SWITCHES | umount -f
force an unmount operation that might otherwise fail. This feature is sometimes helpful when unmounting NFS mounts shared by servers that have become unreachable
622
SWITCHES | umount -r
if it can't unmount a filesystem; it should attempt to remount it in read-only mode
623
SWITCHES | umount -t STRING
unmount only partitions of the specified type. You can list multiple filesystem types by separating them with commas.
624
SWITCHES | ls -F
``` append indicator (one of */=>@|) to entries --classify / Directory * Executable | Named pipe = Socket @ Symbolic Link ```
625
SWITCHES | ls -a
show hidden files (dot) | --all
626
SWITCHES | ls -l
long listing
627
SWITCHES | ls --color
colored listing
628
SWITCHES | ls -d
only list the directory's name; useful for globbing for directories --directory
629
SWITCHES | ls -R
display directory contents recursively. | --recursive
630
SWITCHES | cp -f
overwrite any existing files without prompting | --force
631
SWITCHES | cp -i
prompt before overwriting | --interactive
632
SWITCHES | cp -p
preserves ownership and permissions; if possible | --preserve
633
SWITCHES | cp -R
copy recursively --recursive Although -r also performs a recursive copy; its behavior with files other than ordinary files and directories is unspecified. Most cp implementations use -r as a synonym for -R ; but this behavior isn't guaranteed
634
SWITCHES | cp -a
similar to -R ; but it also preserves ownership and copies links as is. The -R option copies the files to which symbolic links point rather than the symbolic links themselves. --archive
635
SWITCHES | cp -u
copy the file only if the original is newer than the target or if the target doesn't exist --update
636
SWITCHES | touch -a
change the access time alone; not the modification time | --time=atime
637
SWITCHES | touch -m
change the modification time alone; not the access time | --time=mtime
638
SWITCHES | touch -c
don't create the file if it doesn't exist | --no-create
639
SWITCHES | touch -t STRING
ets the time to the value specified by STRING | MMDDhhmm[[CC]YY][.ss]
640
SWITCHES | tar C
Changes to directory dir before performing operations - -directory eg. tar -xvzf bigfile.tar.gz -C /folder/subfolder/
641
SWITCHES | tar f
Uses the file called file on the computer called host as the archive file --file [host:]file
642
SWITCHES | tar g STRING
Performs an incremental backup or restore; using file as a list of previously archived files --listed- incremental file
643
SWITCHES | tar M
Creates or extracts a multi-volume archive | --multi- volume
644
SWITCHES | tar p
Preserves all protection information | --preserve- permissions
645
SWITCHES | tar P
Retains the leading / on filenames | --absolute- paths
646
SWITCHES | tar v
Lists all files read or extracted; when used with --list ; displays file sizes; ownership; and time stamps --verbose
647
SWITCHES | tar W
Verifies the archive after writing it | --verify
648
SWITCHES | tar z
Compresses an archive with gzip | --gzip or -- ungzip
649
SWITCHES | tar j
Compresses an archive with bzip2 --bzip2 some older versions used I or y
650
SWITCHES | tar J
Compresses an archive with xz | --xz
651
SWITCHES | tar c
Creates an archive | --create
652
SWITCHES | tar A
Appends tar files to an archive | --concatenate
653
SWITCHES | tar r
Appends non- tar files to an archive | --append
654
SWITCHES | tar u
Appends files that are newer than those in an archive | --update
655
SWITCHES | tar d
Compares an archive to files on disk | --diff or --compare
656
SWITCHES | tar t
Lists an archive's contents | --list
657
SWITCHES | tar x
Extracts files from an archive | --extract or --get
658
SWITCHES | cpio -o
creates an archive and copies files into it | --create
659
SWITCHES | cpio -i
extracts data from an existing archive. | --extract
660
SWITCHES | cpio -p
combines the copy-out and copy-in modes; enabling you to copy a directory tree from one location to another. --pass-through
661
SWITCHES | cpio -a
Resets the access time after reading a file so that it doesn't appear to have been read. --reset- access-time
662
SWITCHES | cpio -A
Appends data to an existing archive. | --append
663
SWITCHES | cpio -E STRING
Uses the contents of filename as a list of files to be extracted in copy-in mode. --pattern-file=filename
664
SWITCHES | cpio -F STRING
Uses filename as the cpio archive file; if this parameter is omitted; cpio uses standard input or output. --file=filename
665
SWITCHES | cpio -H STRING
Uses a specified format for the archive file. Common values for format include bin (the default; an old binary format); crc (a newer binary format with a checksum); and tar (the format used by tar ). --format=format
666
SWITCHES | cpio -I STRING
Uses the filename specified by STRING instead of standard input. (Unlike -F ; this option does not redirect output data.)
667
SWITCHES | cpio --no-absolute-filenames
In copy-in mode; extracts files relative to the current directory; even if filenames in the archive contain full directory paths.
668
SWITCHES | cpio -o STRING
Uses the filename specified by STRING instead of standard output. (Unlike -F ; this option does not redirect input data.)
669
SWITCHES | cpio -t
Displays a table of contents for the input | --list
670
SWITCHES | cpio -u
Replaces all files without first asking for verification. | --unconditional
671
SWITCHES | cpio -v
Displays filenames as they're added to or extracted from the archive. When used with -t ; displays additional listing information (similar to ls -l ). --verbose
672
SWITCHES | dd if=STRING
use STRING as the input file | dd if=/dev/sda3 of=/dev/dvd
673
SWITCHES | dd of=STRING
use STRING as the output file | dd if=/dev/sda3 of=/dev/dvd
674
SWITCHES | dd bs=NUMBER
read the filesystem using a block size of NUMBER | 1024 seems good
675
SWITCHES | dd count=NUMBER
read count*bs bytes from the input file
676
SWITCHES | ln -f
overwrite any existing files without prompting | --force
677
SWITCHES | ln -i
prompt before overwriting | --interactive
678
SWITCHES | ln -d
attempt to make a hard link to a directory or -F or --directory usually fails
679
SWITCHES | ln -s
make a symbolic link | --symbolic
680
SWITCHES | mkdir -m STRING
causes the new directory to have the specified permission mode; expressed as an octal number. --mode=mode
681
SWITCHES | mkdir -p
create parent directories as needed | --parents
682
SWITCHES | rmdir --ignore-fail-on-non-empty
don't display an error message if the directory isn't empty
683
SWITCHES | rmdir -p
delete parent directories recursively - -parents eg. rmdir -p one/two/three
684
SWITCHES | chown -R
--recursive
685
SWITCHES | chmod u
set permissions for the owner
686
SWITCHES | chmod g
set permissions for the group
687
SWITCHES | chmod o
set permissions for all others (world)
688
SWITCHES | chmod a
set permissions for ugo
689
SWITCHES | chmod +
add permissions
690
SWITCHES | chmod -
remove permissions
691
SWITCHES | chmod =
set permissions equal to
692
SWITCHES | chmod r
read permission
693
SWITCHES | chmod w
write permission
694
SWITCHES | chmod x
execute permission
695
SWITCHES | chmod X
execute permission only if it's already set
696
SWITCHES | chmod s
SUID or SGID
697
SWITCHES | chmod t
sticky bit
698
SWITCHES | chmod u
existing owner's permissions
699
SWITCHES | chmod o
existing other permissions
700
SWITCHES | umask -S
display permissions that will not be removed from files/folder symbolically e.g. u=rwx;g=rx;o=rx
701
SWITCHES | newgrp -l
reinitializes the environment as if the user had just logged in
702
SWITCHES | chattr [+-]A
Linux won't update the access time stamp when you access a file. This can reduce disk input/output; which is particularly helpful for saving battery life on laptops.
703
SWITCHES | chattr [+-]a
disables write access to the file except for appending data.
704
SWITCHES | chattr [+-]c
causes the kernel to compress data written to the file automatically and uncompress it when it's read back.
705
SWITCHES | chattr [+-]i
cannot be modified: it cannot be deleted or renamed; no link can be created to this file and no data can be written to the file.
706
SWITCHES | chattr [+-]j
tells the kernel to journal all data written to the file. This improves recoverability of data written to the file after a system crash but can slow performance. This flag has no effect on ext2 filesystems.
707
SWITCHES | chattr [+-]s
when the file is deleted; the kernel zeros its data blocks
708
SWITCHES | chattr [+-]t
disables this behavior: small data pieces at a file's end that don't fill a complete block are merged with similar pieces of data from other files
709
SWITCHES | quotacheck -c
create aquota.user and aquota.group files
710
SWITCHES | quotacheck -u
check user quotas
711
SWITCHES | quotacheck -g
check group quotas
712
SWITCHES | edquota -t
sets the soft limit grace period 0 disables it grace periods are per filesystem, not per user
713
SWITCHES | edquota -g STRING
edit the quota for the group STRING
714
SWITCHES | quota -g
display group quotas
715
SWITCHES | quota -l
omits NFS mounts
716
SWITCHES | quota -q
limits output to filesystems on which usage is over the limit
717
SWITCHES | find -perm NUMBER
find files that have the specified permissions also symbolically e.g. -perm g=w
718
SWITCHES | find -perm +NUMBER
find files that have any of the specified permission bits set
719
SWITCHES | find -size NUMBER
``` locate files that use NUMBER units of space; rounding up NUMBER is specified in 512k blocks trail with c for bytes trail with k for kibibytes trail with M for Mebibytes ```
720
SWITCHES | find -size +NUMBER
locate files larger than NUMBER units of space; rounding up
721
SWITCHES | find -size -NUMBER
locate files less than NUMBER units of space; rounding up
722
SWITCHES | find -gid NUMBER
locates files whose gid matches GID
723
SWITCHES | find -group STRING
locate files whose group matches STRING
724
SWITCHES | find -uid NUMBER
locates files whose uid matches UID
725
SWITCHES | find -user STRING
locate files whose owner matches STRING
726
SWITCHES | find -maxdepth NUMBER
only recuse NUMBER directories
727
SWITCHES | which -a
show all matches
728
SWITCHES | type -t
shortens the output to builtin ; file ; alias ; or other short identifiers.
729
SWITCHES | type -a
provides a complete list; for instance; it provides both the alias expansion and the location of the ultimate executable when provided with an alias name.
730
SWITCHES | chkconfig --list
list the services and their applicable runlevels
731
SWITCHES | chkconfig --level NUMBER STRING1 STRING2
set the STRING1 program to on or off (STRING2) on the runlevels specified in NUMBER with no delimiters chkconfig --level 23 nfs-common on
732
SWITCHES | chkconfig --add STRING
adds the STRING script to those managed by chkconfig This approach may not work if the script lacks the necessary comment lines with runlevel sequence numbers for chkconfig 's benefit
733
SWITCHES | shutdown now
shutdown now
734
SWITCHES | shutdown -c
cancel a pending shutdown
735
SWITCHES | shutdown -r
reboot
736
SWITCHES | shutdown -H
halt
737
SWITCHES | shutdown -P
power off
738
SWITCHES | shutdown -h
usually powers off; may halt
739
SWITCHES | systemctl list-units
Displays the current status of all configured units.
740
SWITCHES | systemctl default
Changes to the default target uni
741
SWITCHES | systemctl isolate
Starts the named unit and stops all others. systemctl isolate rescue.target go into single user mode
742
SWITCHES | systemctl start STRING
Starts the named unit.
743
SWITCHES | systemctl stop STRING
Stops the named unit.
744
SWITCHES | systemctl reload STRING
Causes the named unit to reload its configuration file.
745
SWITCHES | systemctl restart STRING
Causes the named unit to shut down and restart.
746
SWITCHES | systemctl status STRING
Displays the status of the named unit. (You can pass a PID value; rather than a name; if you like.)
747
SWITCHES | systemctl enable STRING
Configures the unit to start when the computer next boots.
748
SWITCHES | systemctl disable STRING
Configures the unit not to start when the computer next boots.
749
SWITCHES | vi commands while running o
opens a new line immediately below the current line; moves the cursor to that line; and enters insert mode
750
SWITCHES | vi commands while running #yy
copy # lines
751
SWITCHES | vi commands while running #dd
cut # lines
752
SWITCHES | vi commands while running yw
copy from cursor to end of word
753
SWITCHES | vi commands while running dw
cut from cursor to end of word
754
SWITCHES | vi commands while running p
paste
755
SWITCHES | vi commands while running R
enter text replacement mode
756
SWITCHES | vi commands while running a
enter insert mode and advance the cursor 1 space
757
SWITCHES | vi commands while running ZZ
:wq
758
SWITCHES | vi commands while running ~
change case under cursor and advance 1
759
SWITCHES | vi commands while running u
undo
760
SWITCHES | vi commands while running o
inserts a new line immediately below the current one and enters insert mode on that line
761
SWITCHES | vi commands while running /
search forward for text
762
SWITCHES | vi commands while running ?
search backward for text
763
SWITCHES | vi commands while running cw
clear from cursor to the end of the word and enter insert mode
764
SWITCHES | vi commands while running cc
clear line and enter insert mode
765
SWITCHES | vi commands while running #G
go to line #
766
SWITCHES | vi commands while running H
move cursor to top of screen
767
SWITCHES | vi commands while running L
move cursor to bottom of screen
768
SWITCHES | vi commands while running :%s/STRING1/STRING2/g
replace STRING1 with STRING2 globally remove g to do the first occurance on each line to do only lines 3 through 5; replace % with 3,5
769
SWITCHES | vi commands while running :e STRING
load file STRING for editing | closes the currently open file
770
SWITCHES | vi commands while running :r STRING
load file STRING on the line after the cursor
771
SWITCHES | vi commands while running :!STRING
run external command STRING | :!ls runs ls ; enabling you to see what files are present in the current directory
772
LOCATIONS | the bash history
~/.bash_history
773
LOCATIONS | rpm main configuration file
/usr/lib/rpm/rpmrc | typically you don't edit this file
774
LOCATIONS | rpm global configuration file for editing
/etc/rpmrc create it if it doesn't exist The main reason to create such a file is to implement architecture optimizations—for instance; to optimize your code for your CPU model by passing appropriate compiler options when you build a source RPM into a binary RPM. This is done with the optflags line: optflags: athlon -O2 -g -march=i686
775
LOCATIONS | rpm per user configuration file for editing
∼ /.rpmrc create it if it doesn't exist The main reason to create such a file is to implement architecture optimizations—for instance; to optimize your code for your CPU model by passing appropriate compiler options when you build a source RPM into a binary RPM. This is done with the optflags line: optflags: athlon -O2 -g -march=i686
776
LOCATIONS | yum configuration file
/etc/yum.conf holds basic options; such as the directory to which Yum downloads RPMs and where Yum logs its activities. Chances are that you won't need to modify this file
777
LOCATIONS | yum additional configuration files
/etc/yum.repos.d/ You probably shouldn't directly edit these files; instead; if you want to add a repository; you should manually download the RPM that includes the repository configuration and install it using rpm . The next time you use Yum; it will access your new repository along with the old ones
778
LOCATIONS | apt repository configuration
/etc/apt/sources.list | okay to modify
779
LOCATIONS | The main configuration file for dpkg
/etc/dpkg/dpkg.cfg or ∼/.dpkg.cfg
780
LOCATIONS | controls apt and dselect options
/etc/apt/apt.conf | BIND formatting
781
LOCATIONS | the debian installed file database
/var/lib/dpkg
782
LOCATIONS | library path
/etc/ld.so.conf | Generally speaking; there's seldom a need to change the library path system wide
783
LOCATIONS | trusted library directories
/lib and /usr/lib | These directories are always on the library path; even if they aren't listed in ld.so.conf .
784
LOCATIONS | shared library cache
/etc/ld.so.cache
785
LOCATIONS | interrupts
/proc/interrupts virtual filesystem only shows an entry after a driver that uses the interrupt is loaded
786
LOCATIONS | Windows name COM1, IRQ 4
/dev/ttyS0
787
LOCATIONS | Windows name COM2; IRQ 3
/dev/ttyS1
788
LOCATIONS | Windows name COM3; IRQ 4
/dev/ttyS2
789
LOCATIONS | Windows name COM4; IRQ 3
/dev/ttyS3
790
LOCATIONS | Windows name LPT1; IRQ 7
/dev/lp0
791
LOCATIONS | Windows name LPT2; IRQ 5
/dev/lp1
792
LOCATIONS | Windows name A:; IRQ 6
/dev/fd0
793
LOCATIONS | Windows name B:; IRQ 6
/dev/fd1
794
LOCATIONS | what I/O addresses the computer is using
/proc/ioports
795
LOCATIONS | what DMA channels your system uses
/proc/dma
796
LOCATIONS | sysfs virtual filesystem, contains information about devices so that user-space utilities can access the information
/sys
797
LOCATIONS | a place where dynamic device files as drivers are loaded and unloaded; necessitated by hotplug devices
/dev
798
``` LOCATIONS kernel module files; kernel drivers for hardware ```
/lib/modules
799
LOCATIONS | currently loaded kernel modules
/proc/modules
800
LOCATIONS | modprobe configuration
/etc/modprobe.conf or /etc/modprobe.d/
801
LOCATIONS | connected usb devices
/proc/bus/usb
802
LOCATIONS | where logical volumes for LVM are mapped to names
/dev/mapper
803
LOCATIONS | Serves as an adjunct to system RAM. It is slow but enables the computer to run more or larger programs.
swap partition (mounted with swapon to /swap)
804
LOCATIONS Holds users' data files. Isolating it on a separate partition preserves user data during a system upgrade. Size depends on the number of users and their data storage needs.
/home partition
805
LOCATIONS Holds critical boot files. Creating it as a separate partition lets you circumvent limitations of older BIOSs and boot loaders; which often can't boot a kernel from a point above a value between 504MiB and 2TiB.
/boot partition
806
LOCATIONS Holds most Linux program and data files; this is sometimes the largest partition; although /home is larger on systems with many users or if users store large data files. Changes implemented in 2012 are making it harder to create a separate /usr partition in many distributions
/usr partition
807
LOCATIONS | Holds Linux program and data files that are unique to this installation; particularly those that you compile yourself
/usr/local partition
808
LOCATIONS | Holds Linux program and data files that are associated with third- party packages; especially commercial ones
/opt partition
809
LOCATIONS Holds miscellaneous files associated with the day-to-day functioning of a computer. These files are often transient in nature. Most often split off as a separate partition when the system functions as a server that uses the /var directory for server-related files like mail queues.
/var partition
810
LOCATIONS | Holds temporary files created by ordinary users.
/tmp partition
811
LOCATIONS Not a separate partition; rather; it or its subdirectories are used as mount points for removable media like CDs and DVDs.
/mnt partition
812
LOCATIONS | Holds subdirectories that may be used as mount points for removable media; much like /mnt or its subdirectories.
/media partition
813
LOCATIONS | the partitions that are mounted on boot and their mount points
/etc/fstab
814
LOCATIONS | a list of filesystems linux has mounted; don't edit it
/etc/mtab
815
LOCATIONS | root directory
/
816
LOCATIONS contains static and unshareable files related to the computer's initial booting. Higher-level startup and configuration files reside in another directory; /etc . In this directory; you will find GRUB or LILO configuration files along with the other files necessary for the initial boot. typically; it is recommended that you store /boot on its own partition.
/boot
817
LOCATIONS contains unshareable and static system configuration files. These higher-level startup and configuration files control the various programs and services offered on a system If the Linux distribution uses SysV system initialization; its configuration files are stored here
/etc
818
LOCATIONS contains certain critical executable files; such as ls ; cp ; and mount . These commands are accessible to all users and constitute the most important commands that ordinary users might issue static files; almost never shared
/bin
819
LOCATIONS similar to /bin ; but it contains programs that are normally run only by the system administrator—tools like fdisk and e2fsck . It's static and theoretically shareable; but in practice it makes no sense to share it
/sbin
820
LOCATIONS similar to /bin and /sbin ; but it contains program libraries. Program libraries consist of code that's shared across many programs and stored in separate files to save disk space and RAM. is static and theoretically shareable; although it's not shared in practice
/lib
821
LOCATIONS hosts the bulk of a Linux computer's programs. Its contents are shareable and static; so it can be mounted read-only and may be shared with other Linux systems. For these reasons; many administrators split /usr off into a separate partition; although doing so isn't required
/usr
822
LOCATIONS mirror the organization of /usr osts files that a system administrator installs locally—for instance; packages that are compiled on the target computer. The idea is to have an area that's safe from automatic software upgrades when the OS as a whole is upgraded. Some system administrators split this off into its own partition to protect it from OS reinstallation procedures that might erase the parent partition.
/usr/local
823
LOCATIONS | stores the manual pages used by the man command
/usr/share/man
824
LOCATIONS houses files related to the X Window System (X for short); Linux's GUI environment. often moved to /usr/bin
/usr/X11R6
825
LOCATIONS intended for ready-made packages that don't ship with the OS; such as commercial word processors or games. static and shareable Some system administrators break it into a separate partition
/opt
826
LOCATIONS | contains users' data; and it's shareable and variable
/home
827
LOCATIONS home directory of the root user variable; not shareable
/root
828
LOCATIONS contains transient files of various types—system log files; print spool files; mail and news files; and so on variable; some subfolders are shareable and some are not Many system administrators put /var in its own partition; particularly on systems that see a lot of activity in /var ; like major Usenet news or mail servers.
/var
829
LOCATIONS temporary files variable; seldom shared
/tmp
830
LOCATIONS | removable-media devices
/mnt
831
LOCATIONS | like /mnt ; but it should contain subdirectories for specific media types
/media
832
LOCATIONS | files that represent devices
/dev
833
LOCATIONS virtual filesystem that's created dynamically by Linux to provide access to certain types of hardware information that aren't accessible via /dev
/proc
834
LOCATIONS | the configuration file for updatedb used by locate
/etc/updatedb.conf
835
LOCATIONS | EFI System Partition (ESP)
/boot/efi
836
LOCATIONS | grub legacy configuration file
/boot/grub/menu.lst | /boot/grub/grub.conf
837
LOCATIONS | grub 2 configuration file
/boot/grub/grub.cfg | do not edit
838
LOCATIONS | grub 2 OS probers
etc/grub.d/
839
LOCATIONS | grub 2 menu configuration
/etc/default/grub
840
LOCATIONS | syslogd output
/var/log/messages
841
LOCATIONS | i think this is also syslogd output
/var/log/syslog
842
LOCATIONS | the first program run by the kernel
/sbin/init
843
LOCATIONS the programs the init script is supposed to run when changing runlevels also specifies the default runlevel
/etc/inittab id: runlevels:action:process e. g. l0: 0:wait:/etc/init.d/rc 0 l1: 1:wait:/etc/init.d/rc 1
844
LOCATIONS | the program that runs all of the scripts associated with the desired runlevel
/etc/init.d/rc | or /etc/rc.d/rc
845
LOCATIONS | scripts that are run by rc when the runlevel changes
/etc/rc.d/rc?.d or /etc/init.d/rc?.d or /etc/rc?.d S* scripts are started K* scripts are stopped
846
LOCATIONS | configuration files for systemd
/lib/systemd/system
847
LOCATIONS | Upstart and it's scripts
/etc/init/