Commands - Reverse Flashcards

1
Q

print the working directory

A

pwd

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

print the working directory

A

pwd

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

display text from stdin

A

echo STRING

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

times how long COMMAND takes to execute

Three times are displayed: totalexecution time (aka real time); user CPU time; and system CPU time

A

time COMMAND

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

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.

A

set

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

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

A

exit

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

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

A

logout

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

tells you how a command you enter will be interpreted—as a built-in command; an external command; an alias; and so on

A

type COMMAND

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

displays all of the commands in the history

typically the latest 500 commands

A

history

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

display and execute the last command in your shell history

A

!!

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

execute command NUMBER from the history

A

!NUMBER

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

a directory list to search when you’re entering command or program names

A

$PATH

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

display environment variables

A

env

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

unset an environment variable

A

unset VARNAME

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

the shell prompt

A

$PS1

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

display the manual for COMMAND

A

man COMMAND

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

hypertext formatted manual

A

info COMMAND

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

a built in manual for built in commands

A

help COMMAND

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

Creates a new file containing standard output. If the specified file exists; it’s overwritten. No file descriptor necessary.

A

>

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

Appends standard output to the existing file. If the specified file doesn’t exist; it’s created. No file descriptor necessary.

A

> >

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

Creates a new file containing standard error. If the specified file exists; it’s overwritten. File descriptor necessary.

A

2>

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

Appends standard error to the existing file. If the specified file doesn’t exist; it’s created. File descriptor necessary.

A

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

Creates a new file containing both standard output and standard error. If the specified file exists; it’s overwritten. No file descriptors necessary.

A

&>

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

Sends the contents of the specified file to be used as standard input. No file descriptor necessary.

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

Accepts text on the following lines as standard input. No file descriptor necessary.

A

<

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

Causes the specified file to be used for both standard input and standard output. No file descriptor necessary.

A

<>

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

link stdout from COMMAND1 to stdin of COMMAND2

A

COMMAND1 | COMMAND2

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

display stdin on stdout and save it to the specified files

A

tee

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

run command once for every word passed to it on standard input
find / -user Christine | xargs -d “” \ n”” rm

A

xargs [ options ] [ command [ initial-arguments ]]

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

a separate command whose results are substituted on the command line
rm ` find . / -user Christine `

A

COMMAND

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

a separate command whose results are substituted on the command line
rm $(find ./ -user Christine)

A

$(COMMAND)

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

concatenate files and print on the standard output

A

cat

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

concatenate files and print on the standard output in reverse line order

A

tac

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

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

A

join

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

Write lines consisting of the sequentially corresponding lines from each FILE; separated by TABs; to standard output

A

paste

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

Convert tabs in each FILE to spaces; writing to standard output.
assumes a tab stop every eight characters

A

expand

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

dump files in octal and other formats

A

od

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

sort lines of text files

A

sort

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

Output pieces of FILE to PREFIXaa; PREFIXab; …; default size is 1000 lines; and default PREFIX is ‘x’.
split -l 2 listing1.1.txt numbers

A

split

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
40
Q
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
A

tr [ options ] SET1 [ SET2 ]

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

unexpand - convert spaces to tabs

defaults to 8

A

unexpand

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

report or omit repeated lines

A

uniq

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

Reformat each paragraph in the FILE(s); writing to standard output.
(default of 75 columns)

A

fmt

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

number lines of files (non empty)

the similar to ““cat -b”” by default

A

nl

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

Paginate or columnate FILE(s) for printing

defaults to 80 columns

A

pr

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

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.

A

head

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

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.

A

tail

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

Less is a program similar to more (1); but it has many more features.

A

less

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

Print selected parts of lines from each FILE to standard output.

A

cut

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

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.

A

wc

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

searches for PATTERN in each FILE

A

grep

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

stream editor for filtering and transforming text
sed [ options ] -f script-file [ input-file ]
sed [ options ] script-text [ input-file ]

A

sed

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

RPM Package Manager

A

rpm

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

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.

A

rpm2cpio

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

copy files to and from archives
find ./my-work | cpio -o > /media/usb/my-work.cpio
cpio -i < /media/usb/my-work.cpio

A

cpio

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

a repository based rpm manage
used by: Red Hat; CentOS; Fedora; and some other RPM-based distributions
not usd by: SUSE and Mandriva;

A

yum

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

yumdownloader is a program for downloading RPMs from Yum repositories

A

yumdownloader

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

a gui frontend for yum

also yumex

A

kyum

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

a gui frontend for yum

also kyum

A

yumex

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

debian’s equivelant of rpm

A

dpkg

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

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.

A

dselect

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

debian’s equivelant of yum

A

apt-get

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

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).

A

apt-cache

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

a text based debian package manager with an optional interactive mode that is similar to dselect

A

aptitude

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

a X gui program similar to dselect or aptitude

A

synaptic

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

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.

A

dpkg-reconfigure

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

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

A

alien

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

This environment variable specifies additional directories the system is to search for libraries
Does not require ldconfig for changes to take effect

A

$LD_LIBRARY_PATH

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

prints the shared objects (shared libraries) required by each program or shared object specified on the command line.

A

ldd

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

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

A

ldconfig

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

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

A

uname

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

ps displays information about a selection of the active processes.

A

ps

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

provides a dynamic real-time view of a running system

A

top

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

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

A

free

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

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

A

uptime

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

displays minimal information about the processes associated with the current session

A

jobs

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

looks through the currently running processes and lists the process IDs which match the selection criteria to stdout.
pgrep -u root cron

A

pgrep

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

move the specified job to the background, or start the first background process if it is stopped

A

bg

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

bring the specified job to the foreground

A

fg

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

Run COMMAND with an adjusted niceness (defaults to 10); which affects process scheduling. With no COMMAND; print the current niceness.

A

nice

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

renice alters the scheduling priority of one or more running processes.
renice 7 16580 -u pdavison tbaker

A

renice

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

send a signal to a process
The default signal for kill is TERM.
used to stop programs

A

kill

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

Run COMMAND; ignoring hangup signals

A

nohup

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

kill processes by name

killall vi

A

killall

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

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

A

pkill

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

a utility for querying and configuring PCI devices.

A

setpci

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

utility for displaying information about PCI buses in the system and devices connected to them

A

lspci

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

a trivial program which nicely formats the contents of the /proc/modules (kernel modules)

A

lsmod

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
89
Q
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
A

insmod

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
90
Q
intelligently adds or removes a module from the Linux kernel
e.g. modprobe bluetooth
A

modprobe

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

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.

A

rmmod

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

a utility for displaying information about USB buses in the system and the devices connected to them

A

lsusb

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

initialize a disk or partition for use by LVM

A

pvcreate

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

create a volume group (for LVM)

A

vgcreate

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

create a logical volume in an existing volume group (for LVM)

A

lvcreate

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

scan (all disks) for Logical Volumes (for LVM)

A

lvscan

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

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

A

fdisk

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

GPT fdisk (aka gdisk) is a text-mode menu-driven program for creation and manipulation of partition tables

A

gdisk

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

build a Linux filesystem
deprecated in favour of filesystem specific mkfs. utils
mkfs -t ext3 /dev/sda6

A

mkfs

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

sets up a Linux swap area on a device or in a file

mkswap /dev/sda7

A

mkswap

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

used to specify devices on which paging and swapping are to take place
/dev/sda7

A

swapon

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

dump ext2/ext3/ext4 filesystem information

prints the super block and blocks group information for the filesystem present on device

A

dumpe2fs

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

like dumpe2fs but for xfs; displays filesystem info

A

xfs_info

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

copies the filesystem’s metadata (filenames; file sizes; and so on) to a file

A

xfs_metadump

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

enables you to change many of the filesystem parameters that are reported by dumpe2fs
adjust tunable filesystem parameters on ext2/ext3/ext4 filesystems

A

tune2fs

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

check and repair a Linux filesystem

A

fsck

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

xfs equivelant to tune2fs

xfs_admin -L av_data /dev/sda7

A

xfs_admin

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

display the label and UUID of any partition’s filesystem

A

blkid

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

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

A

debugfs

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

xfs equivelant to debugfs; only for experts

A

xfs_db

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

report file system disk space usage

A

df

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

estimate file space usage

A

du

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

mount a filesystem

mount /dev/sdb7 /mnt/shared

A

mount

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

unmount file systems

A

umount

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

list directory contents

A

ls

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

make a copy

A

cp

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

move (rename) files

A

mv

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

remove files or directories

A

rm

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

Update the access and modification times of each FILE to the current time

A

touch

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

an archiving utility

A

tar

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

compress or expand files; oldest least compression

A

gzip

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

a block-sorting file compressor; improved over gzip

A

bzip2

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

Compress or decompress .xz and .lzma files newest and best compression compared to gzip and bzip2

A

xz

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

Copy a file; converting and formatting according to the operands.
very low level

A

dd

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

make links between files
ln [options] source link
you can’t make hard links to directories

A

ln

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

make directories

A

mkdir

127
Q

remove empty directories

A

rmdir

128
Q

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

A

chown

129
Q

change file mode bits (permissions)

chmod [ options ] [ mode [; mode… ]] filename…

A

chmod

130
Q

sets the bits that will be removed from 777 for directories and 666 for files when a new file/directory is created

A

umask

131
Q

set the users default group

newgrp mygroup

A

newgrp

132
Q

change file attributes on a Linux file system

A

chattr

133
Q

display file attributes

A

lsattr

134
Q

turn on disk quotas

A

quotaon

135
Q

turn off disk quotas

A

quotaoff

136
Q

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

A

quotacheck

137
Q

open a text editor to edit quotas

A

edquota

138
Q

summarizes the quota information about the filesystem you specify or on all filesystems if you pass it the -a option

A

repquota

139
Q

display disk usage and limits

A

quota

140
Q

search for files in a directory hierarchy

A

find

141
Q

reads one or more databases prepared by updatedb(8) and writes file names matching at least one of the PATTERNs

A

locate

142
Q

creates or updates a database used by locate(1)

A

updatedb

143
Q

searches for files in a restricted set of locations; such as standard binary file directories; library directories; and man page directories.

A

whereis

144
Q

searches your path for the command that you type and lists the complete path to the first match it finds

A

which

145
Q
installs grub legacy
grub-install /dev/sda
grub-install '(hd0)'
install to bootsector instead of MBR: 
/dev/sda1 or (hd0;0)
A

grub-install

146
Q

manipulate the EFI Boot Manager

efibootmgr -c -l \EFI\redhat\grub.efi -L GRUB

A

efibootmgr

147
Q
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
A

update-grub

148
Q
print or control the kernel ring buffer
kernel and module log messages
sometimes it's in /var/log/dmesg
A

dmesg

149
Q

(SysV) updates and queries runlevel information for system services

A

chkconfig

150
Q

returns the previous and current runlevel

A

runlevel

151
Q

reread the /etc/inittab file and change runlevels

A

init

152
Q

just like init; but telinit [qQ] will re-read the /etc/inittab

A

telinit

153
Q

shutdown the machine

shutdown -h +15 ““system going down for maintenance””

A

shutdown

154
Q

halt the machine

A

halt

155
Q

reboot the machine

A

reboot

156
Q

poweroff the machine

A

poweroff

157
Q

Control the systemd system and service manager

A

systemctl

158
Q

Query the systemd journal

A

journalctl

159
Q

display text from stdin

A

echo STRING

160
Q

times how long COMMAND takes to execute

Three times are displayed: totalexecution time (aka real time); user CPU time; and system CPU time

A

time COMMAND

161
Q

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.

A

set

162
Q

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

A

exit

163
Q

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

A

logout

164
Q

tells you how a command you enter will be interpreted—as a built-in command; an external command; an alias; and so on

A

type COMMAND

165
Q

displays all of the commands in the history

typically the latest 500 commands

A

history

166
Q

display and execute the last command in your shell history

A

!!

167
Q

execute command NUMBER from the history

A

!NUMBER

168
Q

a directory list to search when you’re entering command or program names

A

$PATH

169
Q

display environment variables

A

env

170
Q

unset an environment variable

A

unset VARNAME

171
Q

the shell prompt

A

$PS1

172
Q

display the manual for COMMAND

A

man COMMAND

173
Q

hypertext formatted manual

A

info COMMAND

174
Q

a built in manual for built in commands

A

help COMMAND

175
Q

Creates a new file containing standard output. If the specified file exists; it’s overwritten. No file descriptor necessary.

A

>

176
Q

Appends standard output to the existing file. If the specified file doesn’t exist; it’s created. No file descriptor necessary.

A

> >

177
Q

Creates a new file containing standard error. If the specified file exists; it’s overwritten. File descriptor necessary.

A

2>

178
Q

Appends standard error to the existing file. If the specified file doesn’t exist; it’s created. File descriptor necessary.

A

179
Q

Creates a new file containing both standard output and standard error. If the specified file exists; it’s overwritten. No file descriptors necessary.

A

&>

180
Q

Sends the contents of the specified file to be used as standard input. No file descriptor necessary.

A
181
Q

Accepts text on the following lines as standard input. No file descriptor necessary.

A

<

182
Q

Causes the specified file to be used for both standard input and standard output. No file descriptor necessary.

A

<>

183
Q

link stdout from COMMAND1 to stdin of COMMAND2

A

COMMAND1 | COMMAND2

184
Q

display stdin on stdout and save it to the specified files

A

tee

185
Q

run command once for every word passed to it on standard input
find / -user Christine | xargs -d “” \ n”” rm

A

xargs [ options ] [ command [ initial-arguments ]]

186
Q

a separate command whose results are substituted on the command line
rm ` find . / -user Christine `

A

COMMAND

187
Q

a separate command whose results are substituted on the command line
rm $(find ./ -user Christine)

A

$(COMMAND)

188
Q

concatenate files and print on the standard output

A

cat

189
Q

concatenate files and print on the standard output in reverse line order

A

tac

190
Q

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

A

join

191
Q

Write lines consisting of the sequentially corresponding lines from each FILE; separated by TABs; to standard output

A

paste

192
Q

Convert tabs in each FILE to spaces; writing to standard output.
assumes a tab stop every eight characters

A

expand

193
Q

dump files in octal and other formats

A

od

194
Q

sort lines of text files

A

sort

195
Q

Output pieces of FILE to PREFIXaa; PREFIXab; …; default size is 1000 lines; and default PREFIX is ‘x’.
split -l 2 listing1.1.txt numbers

A

split

196
Q
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
A

tr [ options ] SET1 [ SET2 ]

197
Q

unexpand - convert spaces to tabs

defaults to 8

A

unexpand

198
Q

report or omit repeated lines

A

uniq

199
Q

Reformat each paragraph in the FILE(s); writing to standard output.
(default of 75 columns)

A

fmt

200
Q

number lines of files (non empty)

the similar to ““cat -b”” by default

A

nl

201
Q

Paginate or columnate FILE(s) for printing

defaults to 80 columns

A

pr

202
Q

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.

A

head

203
Q

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.

A

tail

204
Q

Less is a program similar to more (1); but it has many more features.

A

less

205
Q

Print selected parts of lines from each FILE to standard output.

A

cut

206
Q

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.

A

wc

207
Q

searches for PATTERN in each FILE

A

grep

208
Q

stream editor for filtering and transforming text
sed [ options ] -f script-file [ input-file ]
sed [ options ] script-text [ input-file ]

A

sed

209
Q

RPM Package Manager

A

rpm

210
Q

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.

A

rpm2cpio

211
Q

copy files to and from archives
find ./my-work | cpio -o > /media/usb/my-work.cpio
cpio -i < /media/usb/my-work.cpio

A

cpio

212
Q

a repository based rpm manage
used by: Red Hat; CentOS; Fedora; and some other RPM-based distributions
not usd by: SUSE and Mandriva;

A

yum

213
Q

yumdownloader is a program for downloading RPMs from Yum repositories

A

yumdownloader

214
Q

a gui frontend for yum

also yumex

A

kyum

215
Q

a gui frontend for yum

also kyum

A

yumex

216
Q

debian’s equivelant of rpm

A

dpkg

217
Q

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.

A

dselect

218
Q

debian’s equivelant of yum

A

apt-get

219
Q

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).

A

apt-cache

220
Q

a text based debian package manager with an optional interactive mode that is similar to dselect

A

aptitude

221
Q

a X gui program similar to dselect or aptitude

A

synaptic

222
Q

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.

A

dpkg-reconfigure

223
Q

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

A

alien

224
Q

This environment variable specifies additional directories the system is to search for libraries
Does not require ldconfig for changes to take effect

A

$LD_LIBRARY_PATH

225
Q

prints the shared objects (shared libraries) required by each program or shared object specified on the command line.

A

ldd

226
Q

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

A

ldconfig

227
Q

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

A

uname

228
Q

ps displays information about a selection of the active processes.

A

ps

229
Q

provides a dynamic real-time view of a running system

A

top

230
Q

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

A

free

231
Q

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

A

uptime

232
Q

displays minimal information about the processes associated with the current session

A

jobs

233
Q

looks through the currently running processes and lists the process IDs which match the selection criteria to stdout.
pgrep -u root cron

A

pgrep

234
Q

move the specified job to the background, or start the first background process if it is stopped

A

bg

235
Q

bring the specified job to the foreground

A

fg

236
Q

Run COMMAND with an adjusted niceness (defaults to 10); which affects process scheduling. With no COMMAND; print the current niceness.

A

nice

237
Q

renice alters the scheduling priority of one or more running processes.
renice 7 16580 -u pdavison tbaker

A

renice

238
Q

send a signal to a process
The default signal for kill is TERM.
used to stop programs

A

kill

239
Q

Run COMMAND; ignoring hangup signals

A

nohup

240
Q

kill processes by name

killall vi

A

killall

241
Q

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

A

pkill

242
Q

a utility for querying and configuring PCI devices.

A

setpci

243
Q

utility for displaying information about PCI buses in the system and devices connected to them

A

lspci

244
Q

a trivial program which nicely formats the contents of the /proc/modules (kernel modules)

A

lsmod

245
Q
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
A

insmod

246
Q
intelligently adds or removes a module from the Linux kernel
e.g. modprobe bluetooth
A

modprobe

247
Q

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.

A

rmmod

248
Q

a utility for displaying information about USB buses in the system and the devices connected to them

A

lsusb

249
Q

initialize a disk or partition for use by LVM

A

pvcreate

250
Q

create a volume group (for LVM)

A

vgcreate

251
Q

create a logical volume in an existing volume group (for LVM)

A

lvcreate

252
Q

scan (all disks) for Logical Volumes (for LVM)

A

lvscan

253
Q

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

A

fdisk

254
Q

GPT fdisk (aka gdisk) is a text-mode menu-driven program for creation and manipulation of partition tables

A

gdisk

255
Q

build a Linux filesystem
deprecated in favour of filesystem specific mkfs. utils
mkfs -t ext3 /dev/sda6

A

mkfs

256
Q

sets up a Linux swap area on a device or in a file

mkswap /dev/sda7

A

mkswap

257
Q

used to specify devices on which paging and swapping are to take place
/dev/sda7

A

swapon

258
Q

dump ext2/ext3/ext4 filesystem information

prints the super block and blocks group information for the filesystem present on device

A

dumpe2fs

259
Q

like dumpe2fs but for xfs; displays filesystem info

A

xfs_info

260
Q

copies the filesystem’s metadata (filenames; file sizes; and so on) to a file

A

xfs_metadump

261
Q

enables you to change many of the filesystem parameters that are reported by dumpe2fs
adjust tunable filesystem parameters on ext2/ext3/ext4 filesystems

A

tune2fs

262
Q

check and repair a Linux filesystem

A

fsck

263
Q

xfs equivelant to tune2fs

xfs_admin -L av_data /dev/sda7

A

xfs_admin

264
Q

display the label and UUID of any partition’s filesystem

A

blkid

265
Q

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

A

debugfs

266
Q

xfs equivelant to debugfs; only for experts

A

xfs_db

267
Q

report file system disk space usage

A

df

268
Q

estimate file space usage

A

du

269
Q

mount a filesystem

mount /dev/sdb7 /mnt/shared

A

mount

270
Q

unmount file systems

A

umount

271
Q

list directory contents

A

ls

272
Q

make a copy

A

cp

273
Q

move (rename) files

A

mv

274
Q

remove files or directories

A

rm

275
Q

Update the access and modification times of each FILE to the current time

A

touch

276
Q

an archiving utility

A

tar

277
Q

compress or expand files; oldest least compression

A

gzip

278
Q

a block-sorting file compressor; improved over gzip

A

bzip2

279
Q

Compress or decompress .xz and .lzma files newest and best compression compared to gzip and bzip2

A

xz

280
Q

Copy a file; converting and formatting according to the operands.
very low level

A

dd

281
Q

make links between files
ln [options] source link
you can’t make hard links to directories

A

ln

282
Q

make directories

A

mkdir

283
Q

remove empty directories

A

rmdir

284
Q

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

A

chown

285
Q

change file mode bits (permissions)

chmod [ options ] [ mode [; mode… ]] filename…

A

chmod

286
Q

sets the bits that will be removed from 777 for directories and 666 for files when a new file/directory is created

A

umask

287
Q

set the users default group

newgrp mygroup

A

newgrp

288
Q

change file attributes on a Linux file system

A

chattr

289
Q

display file attributes

A

lsattr

290
Q

turn on disk quotas

A

quotaon

291
Q

turn off disk quotas

A

quotaoff

292
Q

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

A

quotacheck

293
Q

open a text editor to edit quotas

A

edquota

294
Q

summarizes the quota information about the filesystem you specify or on all filesystems if you pass it the -a option

A

repquota

295
Q

display disk usage and limits

A

quota

296
Q

search for files in a directory hierarchy

A

find

297
Q

reads one or more databases prepared by updatedb(8) and writes file names matching at least one of the PATTERNs

A

locate

298
Q

creates or updates a database used by locate(1)

A

updatedb

299
Q

searches for files in a restricted set of locations; such as standard binary file directories; library directories; and man page directories.

A

whereis

300
Q

searches your path for the command that you type and lists the complete path to the first match it finds

A

which

301
Q
installs grub legacy
grub-install /dev/sda
grub-install '(hd0)'
install to bootsector instead of MBR: 
/dev/sda1 or (hd0;0)
A

grub-install

302
Q

manipulate the EFI Boot Manager

efibootmgr -c -l \EFI\redhat\grub.efi -L GRUB

A

efibootmgr

303
Q
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
A

update-grub

304
Q
print or control the kernel ring buffer
kernel and module log messages
sometimes it's in /var/log/dmesg
A

dmesg

305
Q

(SysV) updates and queries runlevel information for system services

A

chkconfig

306
Q

returns the previous and current runlevel

A

runlevel

307
Q

reread the /etc/inittab file and change runlevels

A

init

308
Q

just like init; but telinit [qQ] will re-read the /etc/inittab

A

telinit

309
Q

shutdown the machine

shutdown -h +15 ““system going down for maintenance””

A

shutdown

310
Q

halt the machine

A

halt

311
Q

reboot the machine

A

reboot

312
Q

poweroff the machine

A

poweroff

313
Q

Control the systemd system and service manager

A

systemctl

314
Q

Query the systemd journal

A

journalctl