The Linux network service is a system running condition that must be understood by the system administrator. Three Linux network services are described here to learn about this.
Linux network services can be divided into three types based on the methods used:
1. services controlled by init
2. Services started by the System V Startup Script
3. Services managed by xinetd
The following describes the three services.
I. init-controlled services
In the/etc/inittab, you can set the respawn parameter to automatically start the service when it is disabled.
After the inittab file is modified, you can use # init q to make the change take effect.
Ii. Services started by System V
Started by the System V script in the/etc/rc. d/init. d/directory. To control System V services, we can use
#/Etc/rc. d/init. d/script {start | stop | restart |
You can also use the service command to execute the script, for example
# Service sshd restart
The default Switches of System V services at different levels can be different. We use chkconfig and ntsysv for control.
# Chkconfig -- list view the switch status at the system level of system v service.
# Chkconfig sshd on | off changes the default switch of sshd service between 2 and 5 levels
# Chkconfig -- level sshd on | off changes the default switch of the sshd service at a certain level.
# Ntsysv is a graphical interface. You can select it after running the command, but it only affects the current level.
3. xinetd service management
The management files of the xinetd service are stored in the/etc/xinetd. d directory. You can edit the service files in this directory to enable and disable the service. Each service file has the disable line. If you change the value to yes, the service is disabled. If it is no, the service is started. After the modification is successful, you need to start the xinetd service again to make the modification take effect.
# Service xinetd restart
Here is the knowledge of Linux network services.
- Linux time Conversion Method
- Three Tips for improving Linux Management Efficiency
- Solve Linux root password retrieval
- Introduction to Linux Log Files
- Comprehensive Analysis of Linux scheduled task cron