105.1 Customize and Use the Shell Environment Flashcards

1
Q

Describe the Interactive Login Shell

A
  1. Created when you log into a console

2. Created when logged in remotely via SSH

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

Describe the interactive Non-Login Shell

A

Created when a terminal application such as GNOME Terminal is started

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

/etc/profile

A

The first file read on a login session. Sets up system-wide environment variables, unmask values, Bash history controls, etc.

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

/etc/profile.d/

A

The directory that contains extra script configuration files for Bash. The /etc/profile file will read in the contents of this directory

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

/etc/bashrc

A

You can configure system-wide functions and aliases here

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

/etc/skel

A

The directory that contains the default .bash_profile, .bashrc, and other files that are added to a users home directory when an account is created on the system.

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

~/.bash_profile

A

This file can contain a users modified PATH environment variable and will source the ~/.bashrc file.This file can also be named ~/.profile on some distributions.

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

~/.bashrc

A

Local user command aliases and functions are defined here. This file sources the /etc/bashrc file.

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

~/.bash_logout

A

This file gets called on a user logout and can be used to shut down applications, display a message, or to perform other environment cleanup tasks.

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

~/.bash_login

A

This file gets called on a user login. Typically,.bash_profile and .bashrc are used instead of this file

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

What does the command env do

A

Command used to view environment variables for the current shell

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

What doe the command export do

A

Command used to allow child shell sessions to use an environment variable

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

What does the set command do

A

By itself, displays all Bash shell settings, variables and functions. Can also be sued to enable and disable Bash settings

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

What does the unset command do

A

Used to remove an environment variable and its value

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

What does the alias command do

A

used to create a shortcut to a longer command, typically with options

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

What does the function command do

A

A bash keyword is used to indicate that a new Bash function follows. A Bash function is any custom command that a user can use in a Bash shell.

17
Q

what do the . (dot) command do

A

Used to source or apply functions from a file into the current Bash session or a shell script

18
Q

What does the command source do

A

The same as the . (dot) command where it is sed to source or apply functions from a file into the current Bash session or a shell script