Home Linux System AdministrationBasics 30 Linux Processes Exercises For Sysadmins

30 Linux Processes Exercises For Sysadmins

by schkn

This is the set of exercises following the article on Linux Processes Explained.

If you carefully read the article and understood the principles detailed inside, you should be able to answer most of the questions.

Should you find any errors or imprecisions, feel free to leave a comment.

Good luck!

Processes Basics

  • Question 1 : on your Linux host, there are many processes running at a time. However, one information can uniquely identify a process.

How is it called?

  • Question 2 : when your system boots, it starts the very first process on your instance.

How is it called?

  • Question 3 : you currently have a shell terminal open on your host and you execute the following command.
Linux Processes Exercises 1

Internally, what are the system calls invoked to perform such a command?

  • Question 4 : you open a shell terminal on your host by clicking on “Terminal”.

In short, describe how the terminal works.

Processes Commands

  • Question 5 : you are asked by your system administrator to identify all processes that you own on the host.

Which command would you run to do that?

  • Question 6 : you are asked by your system administrator to identify all the processes on your system.

Can you provide two commands that display all processes on the host?

  • Question 7 : what command displays processes as a tree on Linux?

Background & Foreground Processes

  • Question 8 : what syntax is used on Linux in order to execute a process in the background?
  • Question 9 : what is the term that describes a process that was started in a terminal shell?
  • Question 10 : you executed a command in the background, but you want to have your process executed in the foreground.
Process background - Linux Processes Exercises

What command would you execute?

  • Question 11 : your process is now executed in the foreground.

What controls would you hit on your keyboard in order to stop the process (and not kill it) ?

  • Question 12 : your process is now interrupted.
Foreground processes - Linux Process Exercises

How would you resume the execution in the background?

Resuming a stopped process
  • Question 13 : what keys can you hit on your keyboard in order to send a SIGINT to a process in the foreground?

Signals & Processes

  • Question 14 : how would you define a signal when it comes to processes?
  • Question 15 : what signal is used on Linux in order to gently shutdown a process?
  • Question 16 : on the other hand, let’s say that you want to kill a process immediately, what signal would you use for that? What’s the number of this signal?
  • Question 17 : you executed the following command in your terminal shell.
Script on Linux

The process takes a long time to execute, so you decide to leave your host and shutdown your current terminal.

What happened?

  • Question 18 : what solutions can you give in order to avoid what just happened?
Launching a process without interrupting it - Linux Processes Exercises
  • Question 19 : off the top of your head, can you provide other signals used on Linux systems?

Advanced Processes Commands

  • Question 20 : what command in used on Linux in order to list all processes given a specific pattern?
  • Question 21 : what command would you use in order to easily kill (SIGKILL) all processes starting with “fire” ?
  • Question 22 : on Linux, what command is used in order to execute a process with a custom priority level?
  • Question 23 : a process has a nice level of 19, is it going to use as much resources as possible?
  • Question 24 : what is the default nice level when processes are created on Linux?
  • Question 25 : as a non sudo-user, can you create a process with a nice level of -5?
  • Question 26 : what command can be used in order to set the priority of a running process on Linux?

Monitoring Processes

  • Question 27 : what command can be used on Linux in order to monitor processes in real time?
  • Question 28 : what shortcut can be used in the top command to change the refresh rate?
  • Question 29 : what option can be used in order to execute the top command for a custom number of iterations?
  • Question 30 : are you aware of any other solutions in order to monitor Linux processes effectively?

Conclusion

With those Linux processes exercises, you hopefully learnt more about processes, how you can handle them and monitor them effectively.

Want more exercises?

If you are curious about Linux System Administration, we have an entire section dedicated to it on the website.

You may also like

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.