Linux Commands Flashcards

1
Q

List a directory’s content

A

ls

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

Shows the current working directory’s path

A

pwd

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

Changes the working directory

A

cd

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

Creates a new directory

A

mkdir

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

Deletes a file

A

rm

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

Copies files and directories, including their content

A

cp

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

Moves or renames files and directories

A

mv

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

Creates a new empty file

A

touch

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

Checks a file’s type

A

file

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

Creates and extracts a ZIP archive

A

zip and unzip

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

Archives files without compression in a TAR format

A

tar

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

Edits a file with a text editor

A

nano, vi, and jed

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

Lists, combines, and writes a file’s content as a standard output

A

cat

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

Searches a string within a file

A

grep

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

Finds, replaces, or deletes patterns in a file

A

sed

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

Displays a file’s first ten lines

A

head

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

Prints a file’s last ten lines

A

tail

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

Finds and manipulates patterns in a file

A

awk

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

Reorders a file’s content

A

sort

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

Sections and prints lines from a file

A

cut

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

Compares two files’ content and their differences

A

diff

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

Prints command outputs in Terminal and a file

A

tee

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

Finds files in a system’s database

A

locate

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

Outputs a file or folder’s location

25
Runs a command as a superuser
sudo
26
Runs programs in the current shell as another user
su
27
Modifies a file’s read, write, and execute permissions
chmod
28
Changes a file, directory, or symbolic link’s ownership
chown
29
Creates and removes a user account
useradd and userdel
30
Displays the system’s overall disk space usage
df
31
Checks a file or directory’s storage consumption
du
32
Displays running processes and the system’s resource usage
top
33
Works like top but with an interactive user interface
htop
34
Creates a snapshot of all running processes
ps
35
Prints information about your machine’s kernel, name, and hardware
uname
36
Shows your system’s hostname
hostname
37
Calculates commands’ execution time
time
38
Manages system services
systemctl
39
Runs another command continuously
watch
40
Displays a shell’s running processes with their statuses
jobs
41
Terminates a running process
kill
42
Turns off or restarts the system
shutdown
43
Checks the system’s network connectivity
ping
44
Downloads files from a URL
wget
45
Transmits data between servers using URLs
curl
46
Securely copies files or directories to another system
scp
47
Synchronizes content between directories or machines
rsync
48
Displays the system’s network interfaces and their configurations
lfconfig
49
Shows the system’s network information, like routing and sockets
netstat
50
Tracks a packet’s hops to its destination
traceroute
51
Queries a domain’s IP address and vice versa
nslookup
52
Displays DNS information, including record types
dig
53
Lists previously run commands
history
54
Shows a command’s manual
man
55
Prints a message as a standard output
echo
56
Links files or directories
ln
57
Sets and removes an alias for a file or command
alias and unalias
58
Displays a calendar in Terminal
cal
59
Manages Debian-based distros package libraries
apt-get