Birmingham mumbai



Download 15,21 Mb.
Pdf ko'rish
bet218/482
Sana13.01.2022
Hajmi15,21 Mb.
#355107
1   ...   214   215   216   217   218   219   220   221   ...   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)

[
 165 
]
The first command, as you already know, installs the 
htop
 package on our server. 
With the second command, I'm opening 
htop
 but backgrounding it immediately. 
What I'll see when it's backgrounded is its job ID and process ID (more on this in 
the next section). Now, at any time, I can bring 
htop
 to the foreground with 
fg
. Since 
I just backgrounded it, 
fg
 will bring 
htop
 back since it considers it the most recent. 
As you know, if it wasn't the most recent, I could reference its job ID with the 
fg
 
command to bring it back even if it wasn't my most recently used job. Go ahead and 
practice using the ampersand symbol with a command and then bringing it back to 
the foreground. In the case of 
htop
, it can be useful to start it, background it, and then 
bring it back anytime you need to check the performance of your server.
Keep in mind, though, that when you exit your shell, all your backgrounded 
processes will close. If you have unsaved work in your text editors, you'll lose what 
you were working on. For this reason, if you utilize background processes, you may 
want to check to see if you have any pending jobs still running by executing the 
jobs
 
command before logging out.
In addition, you'll probably notice that some applications background cleanly, while 
others don't. In the case of using a text editor and 
htop
, those applications stay 
paused in the background, allowing us to perform other tasks and then return to 
those commands later. However, some applications may still spit out diagnostic text 
regularly in your main window, whether they're backgrounded or not. To get even 
more control over your bash sessions, you can learn how to use a multiplexer, such 
as 
tmux
 or 
screen
, to allow these processes to run in their own session such that they 
don't interrupt your work. Going over the use of a program such as 
tmux
 is beyond 
the scope of this book, but it is a useful utility to learn if you're interested.
Being able to background and foreground a process allows us to manage tasks on 
the command line more effectively, and is definitely useful. Now, we can expand 
this and look at viewing other processes on the server, including those that we didn't 
manually start such as a text editor. In the next section, we'll take a look at the 
ps
 
command, which can help us understand what is actually running on our server.

Download 15,21 Mb.

Do'stlaringiz bilan baham:
1   ...   214   215   216   217   218   219   220   221   ...   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