Birmingham mumbai



Download 15,21 Mb.
Pdf ko'rish
bet215/482
Sana13.01.2022
Hajmi15,21 Mb.
#355107
1   ...   211   212   213   214   215   216   217   218   ...   482
Bog'liq
Mastering Ubuntu Server Gain expertise in the art of deploying, configuring, managing, and troubleshooting Ubuntu Server by Jay LaCroix (z-lib.org)

[
 162 
]
Managing jobs
Up until now, everything we have been doing on the shell has been right in front of 
us, from execution to completion. We've installed applications, run programs, and 
walked through various commands. Each time, we've had control of our shell taken 
from us, and we've only been able to start a new task when the previous one had 
finished. For example, if we were to install the 
vim-nox
 package with the 
apt install
 
command, we would watch helplessly while 
apt
 takes care of fetching the package 
and installing it for us. While this is going on, our cursor goes away and our shell 
completes the task for us without allowing us to queue up another command. We 
can always open a new shell to the server and multi-task by having two windows 
open at once, each doing different tasks. But that's likely not going to be the most 
efficient method of multitasking when working with the command line.
Instead, we can actually background a process without waiting for it to complete 
while working on something else. Then, we can bring that process back to the front 
to return to working on it or to check whether or not it finished successfully. Think 
of this as a similar concept to a windowing desktop environment, or user interfaces 
on the Windows or macOS operating systems. We can work on an application, 
minimize it to get it out of the way, and then maximize it to continue working with 
it. Essentially, that's the same concept of backgrounding a process in a Linux shell. If 
you were curious how I had a Vim process running in the background earlier while 
discussing prioritizing processes, what I did was send it to the background.
So how exactly do you background and foreground a process? This concept can be 
somewhat difficult to explain. In my opinion, the easiest way to learn a new concept 
is to try it out, and the easiest example I can think of is by (yet again) using a text 
editor. I promise that this time, using a text editor as an example won't be lame. 
In fact, this example is extremely useful and may just become a part of your daily 
workflow. To do this exercise, you can use any command-line text editor you prefer, 
such as Vim or Nano. On Ubuntu Server, 
nano
 is usually installed by default, so 
you already have it if you want to go with that. If you prefer to use Vim, feel free to 
install the 
vim-nox
 package if you haven't already installed it:
sudo apt install vim-nox 
You can actually install 
vim
 rather than 
vim-nox
, but I always 
default to 
vim-nox
 since it features built-in support for scripting 
languages.


Chapter 7

Download 15,21 Mb.

Do'stlaringiz bilan baham:
1   ...   211   212   213   214   215   216   217   218   ...   482




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish