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

A

find

25
Q

Runs a command as a superuser

A

sudo

26
Q

Runs programs in the current shell as another user

A

su

27
Q

Modifies a file’s read, write, and execute permissions

A

chmod

28
Q

Changes a file, directory, or symbolic link’s ownership

A

chown

29
Q

Creates and removes a user account

A

useradd and userdel

30
Q

Displays the system’s overall disk space usage

A

df

31
Q

Checks a file or directory’s storage consumption

A

du

32
Q

Displays running processes and the system’s resource usage

A

top

33
Q

Works like top but with an interactive user interface

A

htop

34
Q

Creates a snapshot of all running processes

A

ps

35
Q

Prints information about your machine’s kernel, name, and hardware

A

uname

36
Q

Shows your system’s hostname

A

hostname

37
Q

Calculates commands’ execution time

A

time

38
Q

Manages system services

A

systemctl

39
Q

Runs another command continuously

A

watch

40
Q

Displays a shell’s running processes with their statuses

A

jobs

41
Q

Terminates a running process

A

kill

42
Q

Turns off or restarts the system

A

shutdown

43
Q

Checks the system’s network connectivity

A

ping

44
Q

Downloads files from a URL

A

wget

45
Q

Transmits data between servers using URLs

A

curl

46
Q

Securely copies files or directories to another system

A

scp

47
Q

Synchronizes content between directories or machines

A

rsync

48
Q

Displays the system’s network interfaces and their configurations

A

lfconfig

49
Q

Shows the system’s network information, like routing and sockets

A

netstat

50
Q

Tracks a packet’s hops to its destination

A

traceroute

51
Q

Queries a domain’s IP address and vice versa

A

nslookup

52
Q

Displays DNS information, including record types

A

dig

53
Q

Lists previously run commands

A

history

54
Q

Shows a command’s manual

A

man

55
Q

Prints a message as a standard output

A

echo

56
Q

Links files or directories

A

ln

57
Q

Sets and removes an alias for a file or command

A

alias and unalias

58
Q

Displays a calendar in Terminal

A

cal

59
Q

Manages Debian-based distros package libraries

A

apt-get