Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Answer the following questions regarding shells: a) List three command line shel

ID: 3605837 • Letter: A

Question

Answer the following questions regarding shells:

a) List three command line shells.

b) Do an Internet search to find and list 3 graphical shells that exist for Unix-based operating systems.

c) When a shell first loads it setup information from special hidden files called a ____________.

d) Give the command to create a new command called ‘config’ that runs the longer command ‘vim ~/.profile’ .

e) What would you type to have your bash prompt change to the phrase “Hello, . Give me a command -->”, where is the current username of whoever is using the shell?

Explanation / Answer

a) List three command line shells.
Ans)
bash, ksh and csh are the command line shells that are widely available in unix operating systems. Bash stands for bourne again shell, ksh stands for korn shell and csh stands for c shell.

b) Do an Internet search to find and list 3 graphical shells that exist for Unix-based operating systems.
Ans)
CDE(Common Desktop Environment), KDE(K Desktop Environment) and Gnome are graphical user interface available for Unix OS. CDE is an open statndard and is based on Motif. KDE is an open source desktop environment for Unix systems. It is primarily used on free unix os like Linux and FreeBSD. Gnome is an open source desktop for Unix systems. It also ships on Solaris as the default unix OS.

c) When a shell first loads it setup information from special hidden files called a ____________.
Ans)
.profile is the hidden config file shell first uses after loading to setup the system. The file name might vary for each shell but the purpose of .profile hidden files remain the same.

d) Give the command to create a new command called ‘config’ that runs the longer command ‘vim ~/.profile’ .
Ans)
alias config=vim ~/.profile

alias is the command we can use to setup a new name or command for the existing command. It saves user time in typing long commands with few keystrokes.

e) What would you type to have your bash prompt change to the phrase “Hello, . Give me a command -->”, where is the current username of whoever is using the shell?

Ans) We need to change the PS1 variable to the required prompt. Below is the command on how to change that. The export command is used to ensure the effect is visible in the subshell as well.
Unix Terminal> export PS1="Hello,Give me a command -->"

Once the command is run the prompt will be changed only for current session. To ensure changes are in effect whenever we login into a new session as well. The same has to be added in the .profile file.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote