Linux Bash Commands Flashcards

1
Q

What command is used to list files and directories in the current directory?

A

ls

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

True or False: The command ‘cd ..’ is used to move to the parent directory.

A

True

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

Fill in the blank: The command to change permissions of a file is _____ .

A

chmod

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

What command is used to display the current working directory?

A

pwd

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

Which command is used to create a new directory?

A

mkdir

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

True or False: The ‘rm’ command is used to rename files.

A

False

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

What does the command ‘cp’ do?

A

It copies files or directories.

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

What command can be used to search for a specific text within files?

A

grep

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

Fill in the blank: The command _____ is used to display the contents of a file.

A

cat

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

What command is used to move or rename files?

A

mv

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

True or False: The command ‘touch’ is used to create an empty file.

A

True

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

What does the ‘echo’ command do?

A

It displays a line of text or a variable value.

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

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

A

tail

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

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

A

head

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

Fill in the blank: The command _____ is used for file compression.

A

gzip

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

What is the purpose of the ‘man’ command?

A

To display the manual for other commands.

17
Q

True or False: The command ‘chown’ is used to change the owner of a file.

A

True

18
Q

What command can be used to find the location of a command in the system?

A

which

19
Q

What does the ‘ps’ command do?

A

It displays the currently running processes.

20
Q

Fill in the blank: To view the contents of a compressed file, use the command _____ .

A

zcat

21
Q

What command is used to terminate a running process?

A

kill

22
Q

True or False: The ‘clear’ command is used to delete files.

A

False

23
Q

What command is used to display disk usage?

A

du

24
Q

Fill in the blank: The command _____ is used to change the current user.

A

su

25
Q

What command can be used to view network connections?

A

netstat

26
Q

True or False: The command ‘tar’ is used for creating and extracting archive files.

A

True

27
Q

What command is used to check the system’s memory usage?

A

free