Performing Basic Linux Tasks Flashcards

1
Q

Is the CLI the same on all Linux distros?

A

No. This will be distro specific (i.e. Red Hat/CentOS/Ubuntu)

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

What does /bin/sh typically do?

A

This typically links to another shell on the OS like /bin/bash or /bin/dash

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

What is the binary location for Red Hat / CentOS distros?

A

/bin/bash

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

What is the binary location for Ubuntu or Debian based distros?

A

/bin/dash

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

What does the command ‘uname’ do?

A

Prints system information

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

What does the command ‘uname -a’ do?

A

Prints all system information (kernel release, kernel version, network node name, architecture etc.)

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

What does the command ‘ls’ do?

A

This command lists all the current directories and files in your current working path, or, a path that you specifiy - but not hidden files

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

What does the command ‘mkdir’ do?

A

This command makes a directory within your current working path or one that you specifiy

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

What does the command ‘cd’ do?

A

This command is used to change directories

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

What does the command ‘pwd’ do?

A

This command is used to show the path of your current working directory

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

What does the command ‘echo’ do?

A

This command is used to display a line (or lines) of text

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

What does the command ‘touch’ do?

A

This command is used to change file timestamps, create files within your current working directory, or within a directory that you specify

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

What does the command ‘cp’ do?

A

This command is used to copy files and directories

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

What are three commands that you can use to view files from within the CLI?

A
  • cat
  • more
  • less
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What are three commands that you can use to edit files from within the CLI?

A
  • vim
  • nano
  • gedit
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What does the command ‘cat’ do?

A

This command is used to concatenate files and print them on the standard output (to the console)

17
Q

What does the command ‘more’ do?

A

This command is a file perusal filter and allows you to view the contents of a file a page at a time.

18
Q

What does the command ‘less’ do?

A

This command is similar to more, but has many more features. Less does not have to read the entire input file before starting so it can be much faster when it comes to large input files