4.6. Exercises
These are some exercises that will help you get the feel for processes running on your system.
4.6.1. General
- Run top in one terminal while you do the exercises in another.
- Run the ps command.
- Read the man pages to find out how to display all your processes.
- Run the command find
/. What effect does it have on system load? Stop this command.
- In graphical mode, start the xclock program in the foreground. Then let it run in the background. Stop the program using the kill command.
- Run the xcalc directly in the background, so that the prompt of the issuing terminal is released.
- What does kill
-9 -1 do?
- Open two terminals or terminal windows again and use write to send a message from one to the other.
- Issue the dmesg command. What does it tell?
- How long does it take to execute ls in the current directory?
- Based on process entries in
/proc, owned by your UID, how would you work to find out which processes these actually represent?
- How long has your system been running?
- Which is your current TTY?
- [removed - did not make sense]
- Name 3 commands which use SUID mode. Explain why this is so.
- Name the commands that are generally causing the highest load on your system.
4.6.2. Booting, init, etc.
- Can you reboot the system as a normal user? Why is that?
- According to your current runlevel, name the steps that are taken during shutdown.
- How do you change the system runlevel? Switch from 3 to 5 and vice versa.
- Make a list of all the services and daemons that are started up when your system has booted.
- Which kernel is currently load at startup?
- Suppose you have to start some exotic server at boot time. Up until now, you logged in after booting the system and started this server manually using a script named
deliver_pizza in your home directory. What do you have to do in order to have the service start up automatically in run level 4, which you defined for this purpose only?
4.6.3. Scheduling
- Use sleep to create a reminder that your pasta is ready in ten minutes.
- Create an at job that copies all files in your home directory to
/var/tmp within half an hour. You may want to create a sub-directory in /var/tmp.
- Make a cronjob that does this task every Monday to Friday during lunch.
- Check that it works.
- Make a mistake in the crontab entry, like issuing the nonexistent command coppy instead of cp. What happens upon execution of the task?
Answer Key
Prev: Summary
Home
Next: I/O redirection
Copyright (c) by the authors.
This section of the wiki is licensed under the terms of the GNU Free Documentation License.
See the LBook-licensing page for details.
Linux® is a registered trademark of Linus Torvalds.
Welcome to LinuxBasics.org - The online community that helps people to get Linux installed and running.
During this tour, we will guide you through our website, which has many facets which wait to be explored
The biggest project we are running is our Linux course, based on the LBook.
The book is stored in wiki-format, which enables us to update and correct it as we go.
Discussion for the course is on our Forum
Our Forum is used for discussion of Linux and for questions and answers.
Search the mailing-list that was used prior to the Forum.
The questions and answers from the list are stored in the list's archives in order to help others with the same problems.
Every weekend, we meet to chat in IRC. These meetings are NOT mandatory, but are a nice chance to get to know each other better.
IRC is also a great tool to solve many problems, since it is very quick and easy to ask for more details if you need them.
The tutorials are one of the oldest sections on the LBo-website.
Here you find explanations on how to do specific tasks in Linux. Many of the tutorials were created after a certain problem
has been discussed (and usually solved :) on the mailing-list.
The tutorials are categorized in
In the links section, you find outbound links to other valuable resources.
One of our later additions to the site. We maintain a mirror of the Linux Documentation Project. This is our contribution to the "home of the HOWTOs"
Another later addition is the LBlog which focuses on how to do stuff on the Linux Desktop. It begins with the basics on installing Ubuntu.
Using the integrated site-search, you can search the tutorials, the LBook and all other wiki-pages
Simply type the search term into the box in the upper-right corner of our webpages
As a community, we depend on your feedback and collaboration. So, if you have something to share with others, please contact us. If you have a suggestion for a topic you would like to see covered here, please add it on the Wishlist.
There are many ways to contribute: You can answer questions on the Forum, you can write a complete tutorial or just a step-by-step documentation on how you completed a specific task using linux. Ask questions if the information on this site is not clear, tell us if we got something wrong, spell-check our writings, whatever.
We are looking forward to meeting you at LinuxBasics.org
Anita, Jisao, Sam and Stefan