LinuxNavigatingFiles Flashcards

(50 cards)

1
Q

What file stores user account information in Linux?

A

/etc/passwd

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

What file stores hashed passwords for users?

A

/etc/shadow

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

What command shows the currently logged-in user?

A

whoami

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

What command shows all users currently logged in?

A

who or w

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

What does the ‘su’ command do?

A

Switches user (defaults to root if no username is given)

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

What does ‘sudo’ allow you to do?

A

Run a command with superuser (root) privileges

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

How do you return to a previous user or session?

A

exit

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

What is the root directory in Linux?

A

/

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

What directory contains user personal folders?

A

/home

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

Where are configuration files stored?

A

/etc

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

What directory contains essential user commands?

A

/bin

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

Where is user-installed software and libraries located?

A

/usr

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

What directory contains logs and mail?

A

/var

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

Which directory is used for temporary files?

A

/tmp

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

What is the home directory for the root user?

A

/root

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

Where are device files located?

A

/dev

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

Which directory contains virtual system information like CPU?

A

/proc

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

What command shows the current directory?

A

pwd

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

What command changes to the /etc directory?

A

cd /etc

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

What does ‘cd ~’ do?

A

Goes to the home directory

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

How do you move up one level in the directory?

22
Q

What does ‘ls’ do?

A

Lists files in a directory

23
Q

What does ‘ls -l’ show?

A

Lists files with details

24
Q

What does ‘ls -a’ show?

A

Lists all files including hidden ones

25
What command creates an empty file?
touch filename
26
How do you create a new directory?
mkdir directoryname
27
How do you copy a file?
cp source destination
28
How do you rename or move a file?
mv oldname newname
29
What command deletes a file?
rm filename
30
What command deletes a directory and its contents?
rm -r directoryname
31
What command prints the whole file content?
cat filename
32
How do you view file content one page at a time?
less filename
33
Which command shows the first 10 lines of a file?
head filename
34
Which command shows the last 10 lines of a file?
tail filename
35
What is an absolute path?
A full path starting from the root (e.g., /etc/passwd)
36
What is a relative path?
A path based on your current location
37
What does 'chmod' do?
Changes file permissions
38
What does 'chown' do?
Changes file ownership
39
What do the first three permission characters represent?
Owner permissions
40
What does 'r' mean in file permissions?
Read
41
What does 'w' mean in file permissions?
Write
42
What does 'x' mean in file permissions?
Execute
43
What does 'df -h' show?
Disk usage in human-readable format
44
What does 'du -sh' show?
Folder size in human-readable format
45
What does 'lsblk' show?
Lists all drives and partitions
46
What does 'fdisk -l' do?
Lists drive partitions (requires sudo)
47
What command is used to SSH into a remote system?
ssh user@ip_address
48
What command securely copies files to a remote system?
scp file user@host:/path
49
How can you learn more about a command?
man command
50
What is tab completion useful for?
Speeds up typing commands and paths