unix Flashcards

1
Q

uname -r

A

Shows the kernel version (release)

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

uname -m

A

Displays the system architecture

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

uname -a

A

Displays all information that uname can output

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

lscpu

A

Shows details about the CPU

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

lsmod

A

Shows the running kernel modules

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

modinfo

A

Displays detailed information about a kernel module

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

modinfo -a

A

Shows the author of a kernel module

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

modinfo -d

A

Shows a brief description of the kernel module

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

modinfo -l

A

Shows the license under which the kernel module is located

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

modprobe

A

Loads a kernel module into the kernel

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

modprobe -r

A

Unloads a kernel module from the kernel

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

lspci

A

Lists all PCI devices

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

lspci -v

A

Lists all PCI devices in a more detailed view

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

lspci -vv / lspci -vvv

A

Lists all PCI devices in an even more detailed view

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

lspci -k

A

Lists all PCI devices

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

lsusb

A

Lists all USB devices

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

lsusb -v

A

Lists all USB devices in a more detailed view

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

lsusb -s 002

A

Lists only the USB devices on bus 002

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

lsusb -d

A

Only shows the USB devices of the respective manufacturer

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

lsusb -t

A

Displays the USB devices in a tree view

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

pstree

A

Shows running processes in a tree view

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

pstree -p

A

Shows running processes including the process ID in a tree view

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

dmesg

A

Reads the kernel ring buffer (kernel boot logs)

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

journalctl

A

Displays all systemd logs

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

journalctl -k

A

Displays all systemd logs related to the kernel

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

chkconfig –list

A

Shows the services that are started automatically

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

service start

A

Starts a process (on SysVinit systems)

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

service stop

A

Stops a process (on SysVinit systems)

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

service status

A

Shows the status of a process (on SysVinit systems)

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

initctl list

A

Shows a list of all init services + their status

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

initctl start

A

Starts a process (on upstart systems)

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

initctl stop

A

Stops a process (on upstart systems)

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

initctl status

A

Shows the status of a process (on upstart systems)

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

systemctl start

A

Starts a process (on systemd systems)

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

systemctl stop

A

Stops a process (on systemd systems)

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

systemctl status

A

Shows the status of a process (on systemd systems)

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

systemctl list-units

A

Lists all systemd units of the system including status

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

systemctl restart

A

Restarts a process (on systemd systems)

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

runlevel

A

Shows in which runlevel you are currently and before

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

init 3

A

Changes to run level 3

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

telinit 3

A

Changes to run level 3

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

systemctl isolate multi-user.target

A

Changes to the boot target Multi-User.Target (systemd)

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

systemctl get-default

A

Displays the set standard boot target

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

systemctl set-default multi-user.target

A

Sets the standard boot target to Multi-User.Target

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

systemctl isolate reboot.target

A

Restarts the system

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

systemctl isolate poweroff.target

A

Turns off the system

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

shutdown -r +10

A

Restarts the system in 10 minutes

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

shutdown -c

A

Deletes the previously set waiting time and thus the entire command

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

shutdown -r now

A

Immediately restart the system

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

shutdown -h now

A

Shuts down the system immediately

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

halt

A

Shuts down the system

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

poweroff

A

Shuts down the system

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

reboot

A

Reboots the system

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

wall

A

Sends a message through the system to logged-in users

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

swapon -s

A

Displays the swap partitions or files in use

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

swapoff -a

A

All swap files or swap partitions will be stopped

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

swapon -a

A

Any swap files or swap partitions will start

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

lsblk

A

Lists all block devices (hard drives)

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

df

A

Lists all hard disks including storage space and mount point

60
Q

blkid

A

Displays the UUID of a hard drive

61
Q

mount

A

Shows all mounts of the system

62
Q

pvs

A

Displays the physical volume (PV) (with installed LVM)

63
Q

vgs

A

Displays the volume groups (VG) (if LVM is installed)

64
Q

lvs

A

Displays the logical volumes (LV) (if LVM is installed)

65
Q

grub-install

A

Installs GRUB Legacy in the corresponding GRUB partition

66
Q

grub

A

Opens a GRUB shell (legacy)

67
Q

grub-mkconfig / grub2-mkconfig

A

Creates a new grub.cfg file (GRUB 2). To do this

68
Q

update-grub

A

Same function as grub-mkconfig

69
Q

ldd /path/program

A

Shows which libraries the respective program uses

70
Q

ldconfig

A

Makes new libraries known system-wide

71
Q

LD_LIBRARY_PATH

A

Variable in which a library path can be stored

72
Q

dpkg -i

A

Installs the program

73
Q

dpkg –configure

A

Configures the program (usually not necessary because this happens automatically during installation)

74
Q

dpkg-reconfigure

A

Completely reconfigures

75
Q

dpkg -L

A

Shows in which paths the program would be installed

76
Q

dpkg -l

A

Shows a list of all installed packages on the system

77
Q

dpkg -r

A

Removes from the system. Configuration files are retained!

78
Q

dpkg -P

A

Removes including configuration files

79
Q

dpkg –purge

A

Removes including configuration files

80
Q

apt install ./

A

Installs the downloaded in the current directory

81
Q

apt purge

A

Removes including all configuration files and dependencies

82
Q

apt update

A

Updates the package sources from /etc/apt/sources.list

83
Q

apt dist-upgrade

A

Updates the entire Linux system to the latest state

84
Q

apt upgrade

A

Updates the system but does not delete any files. So refuses service when a file should be deleted

85
Q

apt full-upgrade

A

Updates the system and also deletes files if necessary.

86
Q

apt autoremove

A

Deletes files that are no longer needed due to a system update

87
Q

apt-cache search

A

Searches for in the apt cache

88
Q

apt-cache depends

A

Outputs the dependencies of (before the installation!)

89
Q

aptitude install

A

Installs with aptitude

90
Q

aptitude remove

A

Removes from the system. Configuration files are retained.

91
Q

aptitude purge

A

Removes including configuration files from the system.

92
Q

aptitude search

A

Searches for the package in the aptitude cache

93
Q

aptitude

A

Starts the graphical user interface of aptitude

94
Q

rpm -qpl

A

Shows in which paths the program would be installed

95
Q

rpm -qpi

A

Displays detailed information on

96
Q

rpm -i

A

Installs on the system (dependencies are not resolved independently!)

97
Q

rpm -qa

A

Displays all programs installed on the system

98
Q

rpm -e

A

Removes from the system (e = erase)

99
Q

rpm -U

A

Updates to a newer version

100
Q

rpm -qf /path/program

A

Shows from which package /path/program originated

101
Q

yum update

A

Updates the entire system to the latest version (Red Hat systems)

102
Q

yum search

A

Searches for in the package sources

103
Q

yum info

A

Provides detailed information on

104
Q

yum install

A

Installs including all dependencies

105
Q

yum list installed

A

Displays all programs installed on the system

106
Q

yum remove

A

Removes from the system

107
Q

yum autoremove

A

Deletes files that are no longer needed due to a system update

108
Q

yum whatprovides

A

Shows

109
Q

yumdownloader

A

Downloads without installing it at the same time

110
Q

zypper se

A

Searches for in the package sources (SUSE systems)

111
Q

zypper install

A

Installs including all dependencies (SUSE systems)

112
Q

zypper remove

A

Removes from the system

113
Q

zypper list-updates

A

Displays the updates available for the system

114
Q

zypper update

A

Updates the system to the current status

115
Q

zypper repos

A

Shows the configured package sources from zypper

116
Q

man 2

A

Displays man page 2 of

117
Q

man 4

A

Displays man page 4 of

118
Q

history

A

Displays a history of the most recently entered commands

119
Q

HISTFILE

A

Variable that contains the file in which the history is saved

120
Q

~/.bash_history

A

File in which the history is saved

121
Q

echo $HISTFILE

A

Outputs the content of the HISTFILE variable

122
Q

echo -e

A

Activates the possibility to output line breaks (\n) or TAB (\t)

123
Q

env

A

Shows the environment variables including their values in bash

124
Q

set

A

Shows further variables of the shell + different functions

125
Q

set -x

A

Switches on the debug mode of the shell

126
Q

set +x

A

Switches off the debug mode of the shell

127
Q

unset VARIABLE

A

Deletes a variable

128
Q

bash

A

Starts another bash in which we are located automatically (child process)

129
Q

export VARIABLE

A

Creates a variable that can also be used in child processes

130
Q

/proc

A

Virtual directory that represents running processes

131
Q

/sys

A

Virtual directory that contains information about the system hardware and about kernel modules

132
Q

/dev

A

Device directory

133
Q

/sbin/init

A

The first process that is started with SysVinit or upstart systems

134
Q

/etc/inittab

A

File that is consulted by init. Contains the standard run level

135
Q

/etc/init.d

A

Start / stop scripts for init (Debian systems)

136
Q

/etc/rc.d

A

Start / stop scripts for init (Red Hat systems)

137
Q

/etc/init

A

Contains configuration files that are started at system start (upstart)

138
Q

/etc/systemd/system

A

Contains the so-called systemd units that are started by systemd (systemd)

139
Q

/lib/systemd/system

A

Contains the so-called systemd units that are started by systemd (systemd)

140
Q

/etc/systemd/system.conf

A

Main configuration file of systemd

141
Q

/bin

A

Contains basic system commands

142
Q

/sbin

A

Contains basic system commands that can only be executed by root or users with root rights

143
Q

/boot

A

Contains all the data required to boot the system

144
Q

/etc

A

Contains configuration files from almost all programs on the system

145
Q

/home

A

Contains the personal directories of the users

146
Q

/lib

A

Contains dynamic libraries and kernel modules (/lib/modules/)