Nginx在Linux中命令扩展

简介: 代码如下

一 .systemctl 命令

1.1 网络服务

#启动网络服务
systemctl start firewalld.service
#停止网络服务
systemctl stop firewalld.service
#重启网络服务
systemctl restart firewalld.service
#查看网络服务状态
systemctl status firewalld.service

1.2 设置开机启动/不启动

#停止cup电源管理服务
systemctl stop cups.service
#禁止cups服务开机启动
systemctl disable cups.service
#查看cups服务状态
systemctl status cups.service
#重新设置cups服务开机启动
systemctl enable cups.service

1.3查看系统上上所有的服务

#列出所有启动unit
systemctl list-units
#列出所有启动文件
systemctl list-unit-files 
#列出所有service类型的unit
systemctl list-units –type=service –all 
#列出 cpu电源管理机制的服务
systemctl list-units –type=service –all grep cpu  
#列出所有target
systemctl list-units –type=target –all  

1.4 systemctl特殊的用法

#查看网络服务是否启动
systemctl is-active network.service
#检查网络服务是否设置为开机启动
systemctl is-enable network.service
#停止cups服务
systemctl stop cups.service
#注销cups服务
systemctl mask cups.service
#查看cups服务状态
systemctl status cups.service
#取消注销cups服务
systemctl unmask cups.service

1.5 开关机相关的其他命令

#进入睡眠模式
systemctl suspend 
#进入休眠模式
systemctl hibernate
#强制进入救援模式
systemctl rescue  
#强制进入紧急救援模式
systemctl emergency 

1.6  设置运行级别

#获得当前的运行级别
systemctl get-default 
#设置默认的运行级别为mulit-user
systemctl set-default multi-user.target 
#在不重启的情况下,切换到运行级别mulit-user下
systemctl isolate multi-user.target 
#在不重启的情况下,切换到图形界面下
systemctl isolate graphical.target  

1.7 关闭防火墙firewall

systemctl stop firewalld.service
systemctl disable firewalld.service
目录
相关文章
|
18天前
|
Linux 网络安全 Python
linux后台运行命令screen的使用
linux后台运行命令screen的使用
50 2
linux后台运行命令screen的使用
|
18天前
|
Ubuntu Linux
查看Linux系统架构的命令,查看linux系统是哪种架构:AMD、ARM、x86、x86_64、pcc 或 查看Ubuntu的版本号
查看Linux系统架构的命令,查看linux系统是哪种架构:AMD、ARM、x86、x86_64、pcc 或 查看Ubuntu的版本号
130 3
|
14天前
|
机器学习/深度学习 安全 网络协议
Linux防火墙iptables命令管理入门
本文介绍了关于Linux防火墙iptables命令管理入门的教程,涵盖了iptables的基本概念、语法格式、常用参数、基础查询操作以及链和规则管理等内容。
173 73
|
7天前
|
Linux Shell
Linux 中 Tail 命令的 9 个实用示例
Linux 中 Tail 命令的 9 个实用示例
29 6
Linux 中 Tail 命令的 9 个实用示例
|
12天前
|
Linux 应用服务中间件 nginx
|
13天前
|
NoSQL 关系型数据库 Redis
mall在linux环境下的部署(基于Docker容器),Docker安装mysql、redis、nginx、rabbitmq、elasticsearch、logstash、kibana、mongo
mall在linux环境下的部署(基于Docker容器),docker安装mysql、redis、nginx、rabbitmq、elasticsearch、logstash、kibana、mongodb、minio详细教程,拉取镜像、运行容器
mall在linux环境下的部署(基于Docker容器),Docker安装mysql、redis、nginx、rabbitmq、elasticsearch、logstash、kibana、mongo
|
5天前
|
存储 Linux 编译器
linux中vim介绍以及常用命令大全
linux中vim介绍以及常用命令大全
27 8
|
3天前
|
设计模式 Java Linux
Linux的20个常用命令
Linux的23个常用命令
Linux的20个常用命令
|
7天前
|
机器学习/深度学习 安全 网络协议
Web安全-Linux网络命令
Web安全-Linux网络命令
10 1
|
12天前
|
Ubuntu Linux Shell
Linux系统命令 安装和文件相关命令
本文档详细介绍了Linux系统中的常用命令,包括软件安装卸载命令如`dpkg`和`apt-get`,压缩与解压命令如`gzip`、`bzip2`和`xz`,以及`tar`命令用于打包和解包。此外还介绍了文件分割命令`split`,文件操作命令如`cat`、`head`、`tail`、`more`、`less`等,管道命令和`wc`、`grep`、`find`、`cut`、`sort`、`uniq`、`diff`等实用工具。最后,文档还讲解了文件属性相关的命令如`chmod`、`chown`、`chgrp`以及创建硬链接和软链接的`ln`命令。