TESTOUT LINUX PRO EXAM ACTUAL
QUESTIONS AND ANSWERS COMPLETE
SOLUTION GRADED A+
⩥ Use useradd -h or useradd --help
Prevents the home directory from being created regardless of system
settings.
Answer: What does the -M switch do with the useradd command?
⩥ Use usermod -h or usermod --help
Assigns a user to a new list of supplementary groups.
Answer: According to the command help, what does the -G switch do
with the usermod command?
⩥ - Type vi /etc/pref_shell to open vim and create the file
-Press the a key to enter insert mode (or ctrl + insert keys) and type the
required text
-Press Esc key to get out of insert mode
-:wq to save and exit.
Answer: You need to use the vim editor to create a script file to change
and export the SHELL environmental variable as the C-shell.
,Complete the following tasks:
-Open the vim editor with a new file named /etc/pref_shell
-Add the following lines to the file:
SHELL=/bin/csh
export SHELL
-Save and close the file
⩥ -Type in vi /etc/pref_shell to enter document
-change csh to tcsh
-:wq to save and exit.
Answer: You have just added a custom script to change and export the
SHELL environmental variable as the C-shell. However, you decide to
change from the C-shell to tsch.
Your task in this lab is to:
-Open /etc/pref_shell in vim
-Modify the environmental variable line SHELL=/bin/csh to read
SHELL=/bin/tcsh
-Save changes
,⩥ -Use the set command to view a list of variables or use echo
$variableName to show each one
/root
en_US.UTF-8
/bin/bash
linux.
Answer: View the currently set environment variables to find the values
below
HOME
LANG
SHELL
TERM
⩥ use cat /root/.bash_profile or vi /root/.bash_profile to view contents
PATH.
Answer: View the contents of the /root/.bash_profile file. What is the
last word in the file?
⩥ Use cat or vi to view file contents for /etc/shells
, /bin/ksh.
Answer: The /etc/shells file contains a list of shells that are available on
the current system. View the contents of the file and answer the
following question.
Of the shells listed below, which are not available on the system?
/bin/sh
/bin/bash
/bin/ksh
/sbin/nologin
⩥ Use fdisk -l to display info
-Id swap volume by looking for 83 Linux Swap at the end of an entry
line
1st
5th
9668
473632
1st
1st.
QUESTIONS AND ANSWERS COMPLETE
SOLUTION GRADED A+
⩥ Use useradd -h or useradd --help
Prevents the home directory from being created regardless of system
settings.
Answer: What does the -M switch do with the useradd command?
⩥ Use usermod -h or usermod --help
Assigns a user to a new list of supplementary groups.
Answer: According to the command help, what does the -G switch do
with the usermod command?
⩥ - Type vi /etc/pref_shell to open vim and create the file
-Press the a key to enter insert mode (or ctrl + insert keys) and type the
required text
-Press Esc key to get out of insert mode
-:wq to save and exit.
Answer: You need to use the vim editor to create a script file to change
and export the SHELL environmental variable as the C-shell.
,Complete the following tasks:
-Open the vim editor with a new file named /etc/pref_shell
-Add the following lines to the file:
SHELL=/bin/csh
export SHELL
-Save and close the file
⩥ -Type in vi /etc/pref_shell to enter document
-change csh to tcsh
-:wq to save and exit.
Answer: You have just added a custom script to change and export the
SHELL environmental variable as the C-shell. However, you decide to
change from the C-shell to tsch.
Your task in this lab is to:
-Open /etc/pref_shell in vim
-Modify the environmental variable line SHELL=/bin/csh to read
SHELL=/bin/tcsh
-Save changes
,⩥ -Use the set command to view a list of variables or use echo
$variableName to show each one
/root
en_US.UTF-8
/bin/bash
linux.
Answer: View the currently set environment variables to find the values
below
HOME
LANG
SHELL
TERM
⩥ use cat /root/.bash_profile or vi /root/.bash_profile to view contents
PATH.
Answer: View the contents of the /root/.bash_profile file. What is the
last word in the file?
⩥ Use cat or vi to view file contents for /etc/shells
, /bin/ksh.
Answer: The /etc/shells file contains a list of shells that are available on
the current system. View the contents of the file and answer the
following question.
Of the shells listed below, which are not available on the system?
/bin/sh
/bin/bash
/bin/ksh
/sbin/nologin
⩥ Use fdisk -l to display info
-Id swap volume by looking for 83 Linux Swap at the end of an entry
line
1st
5th
9668
473632
1st
1st.