Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Mail Systems
Eclipse Documentation

How To Guides
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Problem Solutions
Privacy Policy




1.7. Exercises

These are some exercises to warm you up for the next chapter:

  1. Where is the bash program located on your system?

  2. Use the --version option to find out which version you are running.

  3. Which shell configuration files are read when you login to your system using the graphical user interface and then opening a terminal window?

  4. 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 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.

  5. Can you explain why bash does not exit when you type Ctrl+C on the command line?

  6. Display directory stack content.

  7. 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> "

  8. Display hashed commands for your current shell session.

  9. How many processes are currently running on your system? Use ps and wc, the first line of output of ps is not a process!

  10. How to display the system hostname? Only the name, nothing more!

  Published under the terms of the GNU General Public License Design by Interspire