Linux Flashcards

1
Q

ls

A

Lists files and directories in the current directory

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

ls -l

A

Lists files with detailed info (permissions, owner, size, date)

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

ls -a

A

Lists all files, including hidden files (those starting with .

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

cd

A

Changes the current working directory

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

pwd

A

Prints the current working directory path

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

mkdir

A

Creates a new directory (folder)

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

rm

A

Deletes a file

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

rm -r

A

Deletes a directory and its contents recursively

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

mv

A

Moves or renames files and directories

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

cp

A

Copies files and directories

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

cat

A

Displays file contents or joins multiple files

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

nano

A

Simple, user-friendly command-line text editor

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

vim/vi

A

Powerful command-line text editors with modes and shortcuts

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

chmod

A

Changes file or directory permissions

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

chown

A

Changes the ownership of a file or directory

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

sudo

A

Runs a command as the superuser (admin privileges)

17
Q

su

A

Switches to another user account (often root)

18
Q

grep

A

Searches text using basic regular expressions

19
Q

fgrep or grep -F

A

Searches for fixed strings (no regex interpretation)

20
Q

egrep or grep -E

A

Searches using extended regular expressions

21
Q

grep -f

A

Searches for patterns from a file

22
Q

grep -e

A

Allows specifying multiple patterns directly in the command

23
Q

man

A

Shows the manual page for a command

24
Q

man grep

A

Displays the manual page specifically for grep

25
df -h
Shows disk space usage in human-readable format
26
du -sh
Shows the size of a directory and its contents
27
ifconfig / ip
Displays network interface configuration (use ip on modern systems)
28
history
Displays a list of previously entered commands
29
Linux Directory Layout
The structure of folders like /home, /etc, /bin, /var, /usr, etc
30
Linux Directory Navigation
Using commands like cd, pwd, ls to move through the file system
31
Least Privilege Principle
Users should have only the minimum level of access needed to perform their tasks
32
Linux Distributions (Overview)
Different flavors of Linux (e.g., Ubuntu, CentOS, Fedora, Debian) built on the Linux kernel but with different tools, package managers, and goals
33