1.7. Exercises

Up one level

-

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

  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!

Broadband Deals
Compare the best broadband deals available in the UK from all the leading Internet Service Providers including BT, Sky and Virgin Media.
IT Support Manchester
For IT support, Manchester based MailSure will provide technical support for your IT needs or take control of your IT requirements at any stage in your business development.
IT Support Bristol
IT Services and IT Support provider based in Bristol. Computer maintenance with server support as standard.
Mobile Broadband Deals
Compare the cheapest mobile broadband deals on Mobile Broadband Genie, the independent UK price comparison website.
Project Planning Software
Atlantic Global offers full solutions of project management software, including project planning software, timesheets and more
City Leased Lines
Dedicated 100Mbit fibre optic Internet and Cloud outsourcing in the City of London, call now on 020 7096 9004 or email sales@metro-tek.com
IT Support
For The Best IT Support In London Make Our IT Department Your IT Department. Microsoft Gold Certified Partner.
IT Support London
Efficent IT Support & Hosted Services for SME businesses in and around greater London.
Reliable Web Hosting
Affordable Web Hosting with one click installs for Joomla, Moodle, Wordpress and more!
Data Recovery
Professional data recovery services