Home>Article>Operation and Maintenance> How to check if dhcp is closed in linux

How to check if dhcp is closed in linux

WBOY
WBOY Original
2022-05-31 17:11:36 4163browse

Method: 1. Use "/etc/init.d/dhcpd status", this statement can check the service status of dhcp; 2. Use the "ps aux" command, this command can check the process information in the system , the syntax is "ps aux | grep dhcp | grep -v grep".

How to check if dhcp is closed in linux

#The operating environment of this tutorial: linux7.3 system, Dell G3 computer.

linux check if dhcp is closed

Check the service status

/etc/init.d/dhcpd status

How to check if dhcp is closed in linux

Check whether the dhcp service is running :

ps aux | grep dhcp |grep -v grep

ps aux command

The process on Linux has 5 states:

1. Running (running or waiting in the run queue)

2. Interrupted (sleeping, blocked, waiting for a certain condition to form or receiving a signal)

3. Uninterruptible (does not wake up and cannot run when receiving a signal, the process must wait until there is an interrupt) Occurrence)

4. Zombie (the process has terminated, but the process descriptor exists until the parent process calls the wait4() system call and is released)

5. Stop (the process receives SIGSTOP, SIGSTP , SIGTIN, SIGTOU signals to stop running)

Extended knowledge:

1. Check whether the startup setting is set

chkconfig --list | grep dhcpd

2. Check whether the port is open

netstat -anulp | grep :67

3: Close dhcpd

/etc/init.d/dhcpd stop

4: Enable hdcpd

/etc/init.d/dhcpd start

Recommended learning:Linux video tutorial

The above is the detailed content of How to check if dhcp is closed in linux. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn