Commands & Directories Flashcards

Learning Linux (91 cards)

1
Q

cd ..

A

Returns to previous directory

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

rm

A

Remove file

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

adduser

A

add new user

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

man “tool”

A

Opens man pages for the specified tool.

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

“tool” -h

A

Prints the help page of the tool.

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

apropos “keyword”

A

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

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

cat

A

Concatenate and print files.

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

whoami

A

Displays current username.

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

id

A

Returns user’s identity.

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

hostname

A

Sets or prints the name of the current host system.

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

uname

A

Prints operating system name.

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

pwd

A

Returns working directory name.

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

ifconfig

A

The ifconfig utility is used to assign or view an address to a network interface and/or configure network interface parameters.

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

ip

A

Ip is a utility to show or manipulate routing, network devices, interfaces, and tunnels.

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

netstat

A

Shows network status.

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

ss

A

Another utility to investigate sockets.

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

What does the ‘ps’ command do?

A

Shows process status.

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

What does the ‘who’ command do?

A

Displays who is logged in.

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

What does the ‘env’ command do?

A

Prints environment or sets and executes a command.

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

What does the ‘lsblk’ command do?

A

Lists block devices.

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

What does the ‘lsusb’ command do?

A

Lists USB devices.

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

What does the ‘lsof’ command do?

A

Lists opened files.

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

What does the ‘lspci’ command do?

A

Lists PCI devices.

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

What does the ‘sudo’ command do?

A

Execute command as a different user.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
What does the 'su' command do?
Requests appropriate user credentials via PAM and switches to that user ID (the default user is the superuser). A shell is then executed.
26
What does the 'useradd' command do?
Creates a new user or update default new user information.
27
What does the 'userdel' command do?
Deletes a user account and related files.
28
What does the 'usermod' command do?
Modifies a user account.
29
What does the 'addgroup' command do?
Adds a group to the system.
30
What does the 'delgroup' command do?
Removes a group from the system.
31
What does the 'passwd' command do?
Changes user password.
32
What does the 'dpkg' command do?
Install, remove and configure Debian-based packages.
33
What does the 'apt' command do?
High-level package management command-line utility.
34
What does the 'aptitude' command do?
Alternative to apt.
35
What does the 'snap' command do?
Install, remove and configure snap packages.
36
What is 'gem'?
Standard package manager for Ruby.
37
What is 'pip'?
Standard package manager for Python.
38
What is 'git'?
Revision control system command-line utility.
39
What is 'systemctl'?
Command-line based service and systemd control manager.
40
What does 'ps' do?
Prints a snapshot of the current processes.
41
What is 'journalctl'?
Query the systemd journal.
42
What does 'kill' do?
Sends a signal to a process.
43
What does 'bg' do?
Puts a process into background.
44
What does 'jobs' do?
Lists all processes that are running in the background.
45
What does 'fg' do?
Puts a process into the foreground.
46
What is 'curl'?
Command-line utility to transfer data from or to a server.
47
What is 'wget'?
An alternative to curl that downloads files from FTP or HTTP(s) server.
48
What does 'python3 -m http.server' do?
Starts a Python3 web server on TCP port 8000.
49
What does 'ls' do?
Lists directory contents.
50
What does 'cd' do?
Changes the directory.
51
What does 'clear' do?
Clears the terminal.
52
What does 'touch' do?
Creates an empty file.
53
What does 'mkdir' do?
Creates a directory.
54
What does 'tree' do?
Lists the contents of a directory recursively.
55
What does 'mv' do?
Move or rename files or directories.
56
What does 'cp' do?
Copy files or directories.
57
What is 'nano'?
Terminal based text editor.
58
What does 'which' return?
Returns the path to a file or link.
59
What does 'find' do?
Searches for files in a directory hierarchy.
60
What does 'updatedb' do?
Updates the locale database for existing contents on the system.
61
What does 'locate' do?
Uses the locale database to find contents on the system.
62
What is 'more'?
Pager that is used to read STDOUT or files.
63
What is 'less'?
An alternative to more with more features.
64
What does 'head' do?
Prints the first ten lines of STDOUT or a file.
65
What does 'tail' do?
Prints the last ten lines of STDOUT or a file.
66
What does 'sort' do?
Sorts the contents of STDOUT or a file.
67
What does 'grep' do?
Searches for specific results that contain given patterns.
68
What does 'cut' do?
Removes sections from each line of files.
69
What does 'tr' do?
Replaces certain characters.
70
What is 'column'?
Command-line based utility that formats its input into multiple columns.
71
What is 'awk'?
Pattern scanning and processing language.
72
What is 'sed'?
A stream editor for filtering and transforming text.
73
What does 'wc' do?
Prints newline, word, and byte counts for a given input.
74
What does 'chmod' do?
Changes permission of a file or directory.
75
What does 'chown' do?
Changes the owner and group of a file or directory.
76
What is the root "/ (FSH)" filesystem?
The top-level directory that contains all files required to boot the operating system before other filesystems are mounted.
77
What does the /bin directory contain?
Essential command binaries.
78
What is found in the /boot directory?
The static bootloader, kernel executable, and files required to boot the Linux OS.
79
What is the purpose of the /dev directory?
Contains device files to facilitate access to every hardware device attached to the system.
80
What type of files are stored in the /etc directory?
Local system configuration files and configuration files for installed applications.
81
What is the /home directory used for?
Each user on the system has a subdirectory here for storage.
82
What does the /lib directory contain?
Shared library files that are required for system boot.
83
What is the purpose of the /media directory?
External removable media devices such as USB drives are mounted here.
84
What is the /mnt directory used for?
Temporary mount point for regular filesystems.
85
What type of files can be found in the /opt directory?
Optional files such as third-party tools.
86
What is the /root directory?
The home directory for the root user.
87
What does the /sbin directory contain?
Executables used for system administration (binary system files).
88
What is the purpose of the /tmp directory?
Used to store temporary files, generally cleared upon system boot.
89
What is contained in the /usr directory?
Executables, libraries, man files, etc.
90
What type of data is stored in the /var directory?
Variable data files such as log files, email in-boxes, web application related files, cron files, and more.
91
PS1
Can be changed to customize the CLI, such as to display the IP address, date, time, and the success or failure of the last command.