Cheat Sheet Flashcards

(76 cards)

1
Q

Opens man pages for the specified tool.

A

man <tools>

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

Prints the help page of the tool.

A

<tool> -h

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

Searches through man pages’ descriptions for instances of a given keyword.

A

apropos <keyword>

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

Concatenate and print files.

A

cat

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

Displays current username.

A

whoami

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

Returns users identity.

A

id

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

Sets or prints the name of the current host system.

A

hostname

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

Prints operating system name.

A

uname

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

Returns working directory name.

A

pwd

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

Used to assign or view an address to a network interface and/or configure network interface parameters.

A

ifconfig

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

A utility to show or manipulate routing, network devices, interfaces, and tunnels.

A

ip

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

Shows network status.

A

netstat

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

Another utility to investigate sockets.

A

ss

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

Shows process status.

A

ps

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

Displays who is logged in.

A

who

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

Prints environment or sets and executes a command.

A

env

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

Lists block devices.

A

lsblk

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

Lists USB devices.

A

lsusb

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

Lists opened files.

A

lsof

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

Lists PCI devices.

A

lspci

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

Execute command as a different user.

A

sudo

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

The utility requests appropriate user credentials via PAM and switches to that user ID (the default user is the superuser). A shell is then executed.

A

su

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

Creates a new user or update default new user information.

A

useradd

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

Deletes a user account and related files.

A

userdel

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Modifies a user account.
usermod
26
Adds a group to the system.
addgroup
27
Removes a group from the system.
delgroup
28
Changes user password.
passwd
29
Install, remove and configure Debian-based packages.
dpkg
30
High-level package management command-line utility.
apt
31
Alternative to apt.
aptitude
32
Install, remove and configure snap packages.
snap
33
Standard package manager for Ruby.
gem
34
Standard package manager for Python.
pip
35
Revision control system command-line utility.
git
36
Command-line based service and systemd control manager.
systemctl
37
Prints a snapshot of the current processes.
ps
38
Query the systemd journal.
journalctl
39
Sends a signal to a process.
kill
40
Puts a process into background.
bg
41
Lists all processes that are running in the background.
jobs
42
Puts a process into the foreground.
fg
43
Command-line utility to transfer data from or to a server.
curl
44
An alternative to curl that downloads files from FTP or HTTP(s) server.
wget
45
Starts a Python3 web server on TCP port 8000.
python3 -m http.server
46
Lists directory contents.
ls
47
Changes the directory.
cd
48
Clears the terminal.
clear
49
Creates an empty file.
touch
50
mkdir
mkdir
51
Lists the contents of a directory recursively.
tree
52
Move or rename files or directories.
mv
53
Copy files or directories.
cp
54
Terminal based text editor.
nano
55
Returns the path to a file or link.
which
56
Searches for files in a directory hierarchy.
find
57
Updates the locale database for existing contents on the system.
updatedb
58
Uses the locale database to find contents on the system.
locate
59
Pager that is used to read STDOUT or files.
more
60
An alternative to more with more features.
less
61
Prints the first ten lines of STDOUT or a file.
head
62
Prints the last ten lines of STDOUT or a file.
tail
63
Sorts the contents of STDOUT or a file.
sort
64
Searches for specific results that contain given patterns.
grep
65
Removes sections from each line of files.
cut
66
Replaces certain characters.
tr
67
Command-line based utility that formats its input into multiple columns.
column
68
Pattern scanning and processing language.
awk
69
A stream editor for filtering and transforming text.
sed
70
Prints newline, word, and byte counts for a given input.
wc
71
Changes permission of a file or directory.
chmod
72
Changes the owner and group of a file or directory.
chown
73
Go back to the previous directory.
cd ..
74
Simplest way to go to the users Home directory.
cd
75
Way to go to the users Home directory using a special character.
cd ~
76
Way to go to the users Home directory by using an environment variable.
cd $HOME