Shell tutorial part 16: processes
We will learn what background and foreground processes are and how to control them, for example starting background processes using '&', moving foreground processes to the background and suspending them using Ctrl+z, how to let background process run using bg, how to kill foreground processes using Ctrl+c, and how to view and kill processes using commands like ps, kill, fg, jobs.
-----------------------
Video content:
0:00 : Introduction. A process is an instance of a program that is being executed right now. When you start a program, you start a process for that program. You can open multiple processes for the same program.
0:50 : Foreground processes. These processes run in the "foreground" of the shell, and don't allow us to use the shell to run other programs.
1:15 : Ctrl+c. Pressing this combination exits foreground processes.
1:30 : Background processes. These processes run in the "background" of the shell, allowing us to continue using it.
1:50 : &. Using the ampersand after the name of a program allows us to open it in the background.
2:37 : ps. Presents a list of all running processes that were started from the current shell.
3:20 : kill |pid|. "Kills" (closes) the process associated with the given pid (process-id).
3:38 : ps -A. Presents all processes currently running, not only those started from the current shell.
4:32 : Ctrl+z. Allows us to move a currently running foreground process to the background. This suspends the program - while the program is in the background, time is frozen for it - the program isn't running, as shown in 5:47.
4:52 : jobs. Presents background processes started from the current shell.
5:04 : fg |job-id|. If the given |job-id| is associated with a job, moves it from the background to the foreground.
5:28 : sleep |seconds|. "Sleeps" the given amount of |seconds|.
5:47 : Suspended background processes. While a program is suspended, time is frozen for it - the program isn't running.
6:35 : bg |job-id|. If the given |job-id| is associated with a suspended background process, it will be resumed ("unsuspended"), while still in the background.
-----------------------
Relevant links:
The complete shell tutorial playlist: https://www.youtube.com/playlist?list=PLuHmgt1HXB7AoJRbiSPzJ22uz34isVF__
Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «Shell tutorial part 16: processes», вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.
Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.
Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!
Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.