Module 1: Chapter 2: Using the Shell

0.0(0)
studied byStudied by 0 people
GameKnowt Play
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/69

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

70 Terms

1
New cards

A command runs a process on the operating system, which then causes the computer to perform a ___.

Job

2
New cards

The ___ is where the command "comes from."

Source

3
New cards

Internal Commands, also called ____, these commands are built-in to the shell itself. A good example is the cd (change directory) command as it is part of the Bash shell.

Built-in commands

4
New cards

These commands are stored in files that are searched by the shell

External Commands

5
New cards

An ___ can override a built-in command, function, or a command that is found in a file.

Alias

6
New cards

What can also be built using existing commands to either create new commands, override commands built-in to the shell or commands stored in files?

Functions

7
New cards

The ___ command allows us to display information from the APT database cache.

apt-cache

8
New cards

A ____ is a collection of commands that is typically executed at the command line

script file

9
New cards

To determine what aliases are set on the current shell use the ____ command.

alias

10
New cards

What is an example of an alias?

Instead of executing the full command each time, you can create an alias called mycal and run the alias: alias mycal=”cal 2030”

11
New cards

Aliases created this way only persist while the shell is open.

True

12
New cards

Once the shell is closed, the new aliases are lost.

True

13
New cards

Each shell has its own aliases, so, aliases created in one shell won’t be available in a new shell that’s opened.

True

14
New cards

An ____ can be used to specify something for the command to act upon

Argument

15
New cards

The ____ command is used to create empty files or update the timestamp of existing files. It requires at least one argument to specify the file name to act upon.

touch

16
New cards

Arguments that contain unusual characters like spaces or non-alphanumeric characters will usually need to be___.

Quoted

17
New cards

What will prevent the shell from interpreting some of these special characters?

Double quotes

18
New cards

What prevents the shell from interpreting any special characters?

Single quotes

19
New cards

The ____ command displays text to the terminal and is used extensively in shell scripting.

echo

20
New cards

What do two exclamation (!!) points mean?

The shell interprets the !! characters as special characters. It means to perform the last command that was executed.

21
New cards

The double quotes block the expansion of some special characters, but not all of them.

True; unfortunately, double quotes do not block the expansion of the exclamation !! characters:

22
New cards

If you enclose text within the ' single quote characters, then all characters have their literal meaning

True

23
New cards

What can be used with commands to expand or modify the way a command behaves?

Options

24
New cards

Short options are specified with a ____ followed by a single character. Short options are how options were traditionally specified.

hyphen (-)

25
New cards

What option specifies tab size?

-T

26
New cards

Long options for commands are preceded by a ____.

double hyphen (- -)

27
New cards

Commands that support long options will often also support arguments that may be specified _______.

with or without an equal sign; for example: ls - -sort time, and ls - - sort=time

28
New cards

What does the lone double hyphen -- option represent?

Indicates the end of all options for the command

29
New cards

The _______ version of UNIX used options with no hyphen at all.

Berkeley Software Distribution (BSD)

30
New cards

common use of the exec command is in what is known as ____.

wrapper scripts

31
New cards

What does a wrapper script do?

Simply configure and launch another program

32
New cards

The _____ command displays system information.

uname

33
New cards

To display information about what kernel version the system is running, use the _____.

-r option (uname -r)

34
New cards

To display all information about the system, use the ____ command.

uname -a or uname - -all

35
New cards

To display information about the kernel name of the system, use the ____ command

uname -s or uname - -kernel-name

36
New cards

To display information about the network node name of the system, use the ____ command.

uname -n or uname - -node-name

37
New cards

To display the kernel release version of the system, use the ____ command,

uname -r or uname - -kernel-release

38
New cards

To display kernel version of the system, use the ____ command.

uname -v or uname - -kernel-version

39
New cards

To display the machine hardware name, use the ____ command.

uname -m or uname - -machine

40
New cards

To display the processor type or unknown of the system, use the ____ command.

uname -p or uname - -processor

41
New cards

To display the operating system of the machine, use the ____ command.

uname -o or uname - -operating-system

42
New cards

To display the help information of the system, use the ____ command.

uname - -help

43
New cards

To display the version information of the system, use the ____ command.

uname - -version

44
New cards

What command searches for the location of a command in the system by searching the PATH variable?

which

45
New cards

Which command is used in order to view the manual page for a topic?

man

46
New cards

When controlling the Man Page Display, what command is used to go down one line?

Return (Enter)

47
New cards

When controlling the Man Page Display, what command goes down one page?

Space

48
New cards

When controlling the Man Page Display, what command search for term?

/term

49
New cards

When controlling the Man Page Display, what command finds next search item?

n

50
New cards

When controlling the Man Page Display, goes to the beginning of the page?

1G

51
New cards

When controlling the Man Page Display, goes to the end of the page?

G

52
New cards

When controlling the Man Page Display, displays help?

h

53
New cards

When controlling the Man Page Display, displays quit man page?

q

54
New cards

Which of the following man page sections provides the name of the command a very brief description?

NAME

55
New cards

Which of the following man page sections shows a summary of how the command line syntax of the program looks?

SYNOPSIS

56
New cards

Which of the following man page sections provides a more detailed description of the command?

DESCRIPTION

57
New cards

Which of the following man page sections lists the options for the command as well as a description of how they are used? Often this information is found in the description section and not in a seperate options section.

OPTIONS

58
New cards

Which of the following man page sections lists files that are associated with the command as well as a description of how they are used?

FILES

59
New cards

Which of the following man page sections provides the name of the person who created the man page and (sometimes) how to contact the person?

AUTHOR

60
New cards

Which of the following man page sections shows where you can find additional information?

SEE ALSO

61
New cards

Executable programs or shell commands for man pages can be found in what section?

1

62
New cards

System calls (functions provided by the kernel) for man pages can be found in what section?

2

63
New cards

Library calls (functions within program libraries) for man pages can be found in what section?

3

64
New cards

Special files (usually found in /dev) for man pages can be found in what section?

4

65
New cards

File formats and conventions, e.g. /etc/passwd for man pages can be found in what section?

5

66
New cards

Games can be found in what section of man pages?

6

67
New cards

Miscellaneous (including macro packages and conventions), e.g. man (7), groff (7) for man pages can be found in what section?

7

68
New cards

System administration commands (usually only for root) for man pages can be found in what section?

8

69
New cards

Kernel routines [non-standard] for man pages can be found in what section?

9

70
New cards

If you forget the name of the man page you’re looking for, what command will help you?

-k

For example, man -k password