Basic Linux commands Flashcards

1
Q

What does ‘pwd’ stand for in command line operations?

A

Print working directory (current location)

‘pwd’ is a command used to display the current directory path in the terminal.

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

What is the purpose of the ‘ls’ command?

A

List directory contents

‘ls’ is used to view files and directories within the current working directory.

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

What does the ‘ls -l’ command do?

A

Long listing format (includes permissions, owner, size, etc.)

This command provides detailed information about files and directories.

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

What is the function of ‘ls -a’?

A

Show hidden files

‘ls -a’ lists all files, including those that are hidden (starting with a dot).

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

What command is used to change the current directory?

A

cd <directory></directory>

‘cd’ stands for change directory and allows navigation to specified directories.

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

What does ‘cd ..’ do?

A

Move up one directory level

This command takes the user to the parent directory of the current directory.

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

What is the purpose of ‘cd -‘?

A

Switch to the previous directory

‘cd -‘ allows the user to return to the last directory they were in.

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

How do you create a new directory in command line?

A

mkdir <directory></directory>

‘mkdir’ stands for make directory and is used to create a new directory.

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

What command would you use to remove a file?

A

rm <file></file>

‘rm’ is the command for removing files from the filesystem.

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

What does ‘rm -r <directory>' accomplish?</directory>

A

Remove a directory and its contents

The ‘-r’ flag stands for recursive, allowing the removal of directories and all files within.

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