Linux Flashcards

1
Q

What command is used to display the current directory in Linux?

A

pwd command

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

How do you list all files, including hidden ones, in a directory?

A

ls -a command.

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

What is the purpose of the ‘ls’ command in Linux?

A

Lists files and directories in the current directory.

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

What is the purpose of the ‘pwd’ command?

A

Prints the current working directory.

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

How do you check the contents of a file without opening it?

A

cat command.

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

What is the command to display the last few lines of a file?

A

tail command.

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

How do you move a file from one directory to another in Linux?

A

mv command.

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

What is the purpose of the ‘mv’ command?

A

Moves or renames files/directories.

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

How do you search for a specific string in a file?

A

grep command.

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

What command is used to display the manual of a command in Linux?

A

man command.

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

How do you rename a file in Linux?

A

mv command (with the new name).

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

What is the purpose of the ‘cp’ command?

A

Copies files or directories.

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

How do you find out the current date and time in Linux?

A

date command.

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

What is the purpose of the ‘grep’ command?

A

Searches for a pattern in files.

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

How do you search for a file or directory in Linux?

A

find command.

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

What is the purpose of the ‘cat’ command?

A

Concatenates and displays file contents.

17
Q

How do you change file permissions in Linux?

A

chmod command.

18
Q

What command is used to list running processes in Linux?

A

ps command.

19
Q

How do you kill a process in Linux?

A

kill command.

20
Q

What is the purpose of the ‘chmod’ command?

A

Changes file permissions.

21
Q

How do you display the contents of a file in real-time?

A

tail -f command.

22
Q

What command is used to shut down or restart the system?

A

shutdown or reboot command.

23
Q

How do you check the available disk space in Linux?

A

df command.

24
Q

What is the purpose of the ‘df’ command?

A

Displays disk space usage.

25
Q

How do you compress files and directories in Linux?

A

tar command (for compression and archiving).

26
Q
A