Linux Service control commands

Source: Internet
Author: User

Just learn Linux, do some notes, hope to be helpful!!!

Learning without thinking is not the case, but thinking without learning is dangerous.

1. Disk partition representation

HD stands for IDE Hard drive (Note:/DEV/HDC fixed to optical drive)

SD represents SCSI hard disk

SDA represents the first SCSI drive

SDA7 represents the third logical partition of the first SCSI hard disk

2. File system type

EXT4, 4th Generation Extended (Extended) file system


Swap, swap file system

3. Firewall iptables

Current shutdown: Service iptables stop

Current start: Service iptables start

Current Restart: Service iptables restart

Display Status: Service iptables status

Set power on off iptables

Chkconfig iptables off

4.Selinuxa

Permanently close selinux:

Vim/etc/sysconfig/selinux

Modify "selinux=disabled"


Save and restart the computer in effect

To view the SELinux status:

Getenforce

Set SELinux temp Status:

Setenforce 0/1

5.init process

Run/sbin/init program loaded by Linux kernel

Is the first process in a system

PID (Process tag) number is always 1


6.init Related configuration Files


/etc/inittab Configuring the default run level

7.runlevels--Run Level

0 Turn off the machine

1 Single-User mode

2 Non-network multi-user character mode

3 full multi-user character mode

4 Not assigned to use

5 Graphical Desktop

6 restart

8. System Service Control

Two different ways:

Service Name control type

Example: Service Network restart


or/etc/rc.d/init.d/service name control type


Control type:

Start: Startup

STOP: Stop

Restart: restart

Reload: Reload

Status: View service status)

9. System service Management Tools

NTSYSV Tools

Provides an interactive, visual window


Can be run at the character terminal


Facilitates centralized management of multiple services


Chkconfig Tools


Do not provide interactive, visual windows


More efficient management of individual services


10. Set the startup status of the system service

Chkconfig--level Level list service name On|off


This article is from the "Network" blog, be sure to keep this source http://yangshufan.blog.51cto.com/13004230/1944663

Linux Service control commands

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.