Birmingham mumbai



Download 15,21 Mb.
Pdf ko'rish
bet241/482
Sana13.01.2022
Hajmi15,21 Mb.
#355107
1   ...   237   238   239   240   241   242   243   244   ...   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)

[
 182 
]
Since I mentioned starting and stopping the unit for OpenSSH in the previous 
examples, an interesting aside is that doing so will not disconnect a current SSH 
session to the server, should you have one open. If you stop the 
ssh
 service, it 
won't drop your connection. Open connections are maintained, and stopping SSH 
only prevents new connections from happening. Therefore, SSH is different when 
compared to other units (such as Apache) in that existing connections aren't dropped 
when restarting the unit.
As I mentioned before, if you want a unit to automatically start when the server 
boots, the unit will need to be enabled. Units are automatically enabled most of the 
time, but in case you find one that isn't enabled, you can enable it with the 
enable
 
keyword:
sudo systemctl enable ssh 
It's just as easy to disable a unit as well:
sudo systemctl disable ssh 
Even though 
systemd
 is primarily used for managing units, it's actually an entire 
platform that manages multiple things on a Linux system, including DNS resolving, 
networking, and more. 
systemd
 even handles logging as well, and it provides us 
with the 
journalctl
 command, which we can use to view logging info (this is also 
why the output of 
systemctl status ssh
 was able to show us log entries). We've 
discussed logging a bit in 
Chapter 4

Navigating and Essential Commands
, and we'll do 
so in more detail during 
Chapter 21

Troubleshooting Ubuntu Servers
 (which will also 
include further discussion of the 
journalctl
 command). For now, just understand 
that 
systemd
 is quite extensive when it comes to the number of things it helps us 
manage. For the purposes of this chapter, however, if you understand how to start, 
stop, enable, disable, and check the status of a unit, you're good to go for now.
You can combine the process of not only enabling a unit, but also 
starting it at the same time: 
sudo systemctl enable --now ssh
The 
--now
 argument tells 
systemctl
 to start the unit immediately 
after enabling it, rather than waiting for the next boot to do so or 
having you also run the 
start
 argument in a separate command.


Chapter 7

Download 15,21 Mb.

Do'stlaringiz bilan baham:
1   ...   237   238   239   240   241   242   243   244   ...   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