Linux Pro Practice Cert
Linux Pro Practice Cert According to the command help, which switch can you use with the killall command to kill a process group instead of just a process? - -g Use -g with the killall command to kill a process group. To find the correct switch to use, type: killall -h or killall --help What does the -M switch do with the useradd command? - Prevents the home directory from being created regardless of system settings. Entering useradd -h or useradd --help shows you that the -M switch with the useradd command prevents the home directory from being created, regardless of the system settings. According to the command help, what does the -G do with the usermod command? - Assigns a user to a new list of supplementary groups. Use the usermod command with the -G switch to assign a user to a new list of supplementary, or secondary group. Using -G will replace the user's current list of secondary groups with the new list used with the command. View the currently set environmental variables to find the values below. HOME LANG SHELL TERM - HOME - /root LANG - en_US.UTF-8 SHELL - /bin/bash TERM - linux Use the set command to view a list of variables, or use the echo $ variable command to show each variable individually. For example, use the echo $SHELL command to see the value for SHELL. View the contents of the /root/.bash_profile file. What is the last word in the file? - PATH The last word in the file is PATH. Use the cat /root/.bash_profile command to view the contents of the file. 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/ksh Use cat /etc/shells to view the contents of the file. You should notice that /bin/ksh is not in the list of available shells. You need to use the vim editor to create a script file to change and export the SHELL environmental variable as the C-shell. Tasks: -Open the vim editor with a new file names /etc/pref_shell -Add the following lines to the file SHELL=/bin/csh export SHELL -Save and close - -Type vi /etc/pref_shell -Press a to enter insert mode -Type SHELL=/bin/csh export SHELL -Press esc to exit insert mode -Type : to enter back into command line -Type wq to save the file and exit You have just added a custom script to change and export the SHELL environmental variable as the C-shell. However, you decided to change from the C-shell to tsch. Tasks: -Open /etc/pref_shell in vim -Modify the environmental variable line
Document information
- Uploaded on
- March 21, 2024
- Number of pages
- 51
- Written in
- 2023/2024
- Type
- Exam (elaborations)
- Contains
- Questions & answers