Basic Command Line Tools Flashcards

1
Q

What’s the command to open a terminal window?

A

term

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

First released in 1989, is commonly used as the default shell for Linux user accounts. This shell was developed by the GNU project as a replacement for the standard Unix operating system shell, called the Bourne shell (named for its creator). It is also available for Windows 10, macOS, and Solaris operating systems.

A

Bash (Bourne Again Shell)

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

This shell was initially released in 1983 but was proprietary software until
2000. It is a programming shell compatible
with the Bourne shell but supports advanced programming features, such as those available
in the C programming languages.

A

Korn Shell

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

What command can be used to print resolved symbolic links or canonical file names?

A

readlink

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

This shell was originally released in 2002. This smaller
shell does not allow command-line editing or command history, but it does provide faster shell program (also called a script) execution.

A

Dash (Debian Almquist Shell)

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

How can we know what’s the current system shell?

A

ls -la /bin/sh
or
readlink /bin/sh

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

How can we know what’s the current shell?

A

echo $SHELL

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

How can we get the bash version?

A

echo $BASH_VERSION

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

What command can we use to change directory and to get the current directory?

A

cd

pwd

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

How can we know the home directory for the current user?

A

echo $HOME

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

What command can be used to know the full path of a executable file?

A

which

The executable MUST be in the path environment variable.

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

What command can be used to know if a binary in built in or external?

A

type

The binary MUST be buit in or in the path environment variable.

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

What environment variable holds the computer name?

A

HOSTNAME

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

What environment variable holds the system language and encoding?

A

LANG

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

What environment variable holds the prompt definition and formatting?

A

PS1

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

What man parameter can be used to search for specific keywords?

A

man -k

17
Q

What environment variable holds the history file path? Where is it located?

A

HISTFILE

It’s located in the path /.bash_history

18
Q

What are the 3 most popular text editors in Linux?

A

emacs, vi and nano

19
Q

What commands can be used to show the content of a given environment variable?

A

echo $VARIABLE

printenv VARIABLE