![linux系统关掉网卡命令](https://i-blog.csdnimg.cn/blog_migrate/9b8cc1d98cff51ac5b13a887b072bfab.png)
linux系统关掉网卡命令
I am new to Linux and I have installed some Linux distributions. I try to learn bash commands. I can shutdown my computer from Desktop manager easily. But How can I shutdown system from bash without a GUI. There are different ways to shutdown Linux system. Following commands will work most of the distributions like Ubuntu, Debian, Mint, Kali, CentOS, RedHat, Fedora.
我是Linux新手,已经安装了一些Linux发行版。 我尝试学习bash命令。 我可以轻松地从桌面管理器关闭计算机。 但是,如何在没有GUI的情况下从bash关闭系统。 有多种方法可以关闭Linux系统。 以下命令将适用于大多数发行版,如Ubuntu,Debian,Mint,Kali,CentOS,RedHat,Fedora。
断电命令 (Poweroff Command)
We can shutdown a Linux system with poweroff
command. If we want to force the shutdown we can use -f
parameter.
我们可以使用poweroff
命令关闭Linux系统。 如果要强制关闭,可以使用-f
参数。
$ sudo poweroff
使用关机命令关机后重新启动 (Reboot After Shutdown with Poweroff Command)
poweroff
command provides the --reboot
option which will start the Linux system after a shutdown.
poweroff
命令提供了--reboot
选项,它将在关机后启动Linux系统。
$ sudo poweroff --reboot
停止 (Halt)
halt
command change system run level by using systems service manager like systemd or service.
通过使用系统服务管理器(如systemd或service)来halt
命令来更改系统运行级别。
$ sudo halt