Библиотека сайта rus-linux.net
1.7. Exercises
These are some exercises to warm you up for the next chapter:
Where is the bash program located on your system?
Use the
--version
option to find out which version you are running.Which shell configuration files are read when you login to your system using the graphical user interface and then opening a terminal window?
Are the following shells interactive shells? Are they login shells?
A shell opened by clicking on the background of your graphical desktop, selecting "Terminal" or such from a menu.
A shell that you get after issuing the command ssh
localhost
.A shell that you get when logging in to the console in text mode.
A shell obtained by the command xterm &.
A shell opened by the mysystem.sh script.
A shell that you get on a remote host, for which you didn't have to give the login and/or password because you use SSH and maybe SSH keys.
Can you explain why bash does not exit when you type Ctrl+C on the command line?
Display directory stack content.
If it is not yet the case, set your prompt so that it displays your location in the file system hierarchy, for instance add this line to
~/.bashrc
:export
PS1
="\u@\h \w>
"Display hashed commands for your current shell session.
How many processes are currently running on your system? Use ps and wc, the first line of output of ps is not a process!
How to display the system hostname? Only the name, nothing more!