Nasir Nawaz
Test por , creado hace más de 1 año

The shell itself stores information that may be useful to the user’s shell session in what are called variables. Examples of variables include $SHELL (which identifi es the shell you are using), $PS1 (which defi nes your shell prompt), and $MAIL (which identifi es the location of your mailbox).

10
0
0
Nasir Nawaz
Creado por Nasir Nawaz hace más de 7 años
Cerrar

Common Shell Environment Variables

Pregunta 1 de 20

1

This contains the full pathname of the bash command. This is usually /bin/
bash.

Selecciona una o más de las siguientes respuestas posibles:

  • BASH

  • OLDPWD

  • PPID

Explicación

Pregunta 2 de 20

1

This is a number representing the current version of the bash command.

Selecciona una o más de las siguientes respuestas posibles:

  • BASH_VERSION

  • TMOUT

  • Version

Explicación

Pregunta 3 de 20

1

This is the effective user ID number of the current user. It is assigned when
the shell starts, based on the user’s entry in the /etc/passwd file.

Selecciona una o más de las siguientes respuestas posibles:

  • EUID

  • UID

  • User_ID

Explicación

Pregunta 4 de 20

1

If set, this variable indicates the text editor used by the fc command to edit
history commands. If this variable isn’t set, the vi command is used.

Selecciona una o más de las siguientes respuestas posibles:

  • FCEDIT

  • EDITOR

  • CMD_EDIT

Explicación

Pregunta 5 de 20

1

This is the location of your history fi le. It is typically located at $HOME/.
bash_history

Selecciona una o más de las siguientes respuestas posibles:

  • HISTFILE

  • HISTFILESIZE

  • HISTORY_SIZE

Explicación

Pregunta 6 de 20

1

This returns the number of the current command in the history list.

Selecciona una o más de las siguientes respuestas posibles:

  • HISTCMD

  • HISNUM

  • HIST

Explicación

Pregunta 7 de 20

1

This is your home directory. It is your current working directory each time
you log in or type the cd command with any options.

Selecciona una o más de las siguientes respuestas posibles:

  • HOME

  • DIRECTORY

  • USERHOME

Explicación

Pregunta 8 de 20

1

This is a value that describes the computer architecture on which the Linux
system is running. For Intel-compatible PCs, the value is i386, i486, i586,
i686, or something like i386-linux. For AMD 64-bit machines, the value is
x86_64.

Selecciona una o más de las siguientes respuestas posibles:

  • HOSTTYPE

  • HARDWARE

  • HOST_INFO

Explicación

Pregunta 9 de 20

1

This is the location of your mailbox fi le. The fi le is typically your username in
the /var/spool/mail directory.

Selecciona una o más de las siguientes respuestas posibles:

  • MAIL

  • ID

  • ADDRESS

Explicación

Pregunta 10 de 20

1

This is the directory that was the working directory before you changed to
the current working directory.

Selecciona una o más de las siguientes respuestas posibles:

  • OLDPWD

  • PREVIOUS_PWD

  • LASTPWD

Explicación

Pregunta 11 de 20

1

This name identifi es the current operating system. For Fedora Linux, the
Variable value is either linux or linux-gnu, depending on the type of shell
you are using. (Bash can run on other operating systems as well.)

Selecciona una o más de las siguientes respuestas posibles:

  • OSTYPE

  • HOST

  • OERATING_SYSTEM

Explicación

Pregunta 12 de 20

1

This is the colon-separated list of directories used to fi nd commands that
you type. The default value for regular users varies for different distribu-
tions, but typically includes the following: /bin:/usr/bin:/usr/local/
bin:/usr/bin/X11:/usr/X11R6/bin:~/bin. You need to type the full
path or a relative path to a command you want to run that is not in your
PATH. For the root user, the value also includes /sbin, /usr/sbin, and
/usr/local/sbin.

Selecciona una o más de las siguientes respuestas posibles:

  • PATH

  • LOCATION

  • CMD

Explicación

Pregunta 13 de 20

1

This is the process ID of the command that started the current shell (for
example, the Terminal window containing the shell).

Selecciona una o más de las siguientes respuestas posibles:

  • PPID

  • PROC_ID

  • PARENT_PROC

Explicación

Pregunta 14 de 20

1

This can be set to a command name that is run each time before your shell
prompt is displayed. Setting this Variable to date lists the current date/
time before the prompt appears.

Selecciona una o más de las siguientes respuestas posibles:

  • PROMPT_COMMAND

  • BEFOR_PS1

  • SHOW_FIRST

Explicación

Pregunta 15 de 20

1

This sets the value of your shell prompt. There are many items that you can
read into your prompt (date, time, username, hostname, and so on).
Sometimes a command requires additional prompts, which you can set with
the variables PS2, PS3, and so on.

Selecciona una o más de las siguientes respuestas posibles:

  • PS1

  • PS2

  • PS3

Explicación

Pregunta 16 de 20

1

This is the directory that is assigned as your current directory. This value
changes each time you change directories using the cd command.

Selecciona una o más de las siguientes respuestas posibles:

  • PWD

  • WD

  • CD

Explicación

Pregunta 17 de 20

1

Accessing this variable causes a random number to be generated. The
number is between 0 and 99999.

Selecciona una o más de las siguientes respuestas posibles:

  • RANDOM

  • GEN_NUMBER

  • RANNUM

Explicación

Pregunta 18 de 20

1

This is the number of seconds since the time the shell was started.

Selecciona una o más de las siguientes respuestas posibles:

  • SECONDS

  • TIME

  • SHELL_START

Explicación

Pregunta 19 de 20

1

This is the number of shell levels associated with the current shell session.
When you log in to the shell, the Variable is 1. Each time you start a new bash
command (by, for example, using su to become a new user, or by simply
typing bash), this number is incremented

Selecciona una o más de las siguientes respuestas posibles:

  • SHLVL

  • SHLEVEL

  • SHNUM

Explicación

Pregunta 20 de 20

1

This can be set to a number representing the number of seconds the shell
can be idle without receiving input. After the number of seconds is
reached, the shell exits. This security feature makes it less likely for
unattended shells to be accessed by unauthorized people. (This must be
set in the login shell for it to actually cause the shell to log out the user.)

Selecciona una o más de las siguientes respuestas posibles:

  • TMOUT

  • SHTIME

  • SHMINT

Explicación