Sous Linux, vous devez utiliser la commande 'service' pour gérer les démons du serveur, tels que 'sshd' ou 'ntpd'.

Ainsi, pour lister les démons : utiliser la commande :

sudo service --status-all

acpid is stopped
atd (pid 1578) is running...
auditd (pid 1475) is running...
cpuspeed is stopped
crond (pid 1563) is running...
hald is stopped
htcacheclean is stopped
httpd (pid 63716) is running...
ip6tables: Firewall is not running.
iptables: Firewall is not running.
irqbalance is stopped
Kdump is not operational
lvmetad is stopped
dmeventd is stopped
mdmonitor is stopped
messagebus is stopped
mysqld (pid 62005) is running...
rndc: neither /etc/rndc.conf nor /etc/rndc.key was found
named is stopped
php (pid 13229) is running...
netconsole module not loaded
Configured devices:
lo eth0
Currently active devices:
lo eth0
nrpe running with pid 1552.
nscd (pid 61392) is running...
nslcd (pid 37450) is running...
ntpd (pid 1545) is running...
portreserve is stopped
master is stopped
Process accounting is disabled.
quota_nld is stopped
rdisc is stopped
rhnsd (pid 1593) is running...
rhsmcertd is stopped
rngd is stopped
rsyslogd (pid 1497) is running...
sandbox is stopped
saslauthd is stopped
smartd is stopped
openssh-daemon (pid 28742) is running...

Pour relancer un service spécifique, comme 'sshd', utiliser la commande suivante :

 # service sshd restart

Stopping sshd: [ OK ]
Starting sshd: [ OK ]

Pour lister l'état d'un démon, utiliser la commande :

# service sshd status

openssh-daemon (pid  28742) is running...

 

 

icon phone
Téléphone/Whatsapp : +33 (0)6 83 84 85 74
icon phone