热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

linux系统关掉网卡命令_如何关闭Linux系统?

linux系统关掉网卡命令IamnewtoLinuxandIhaveinstalledsomeLinuxdistributions.Itrytolearnbashcommands.
linux系统关掉网卡命令

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
重启命令 (Reboot Command)

reboot command actually a synonym of the poweroff command with --reboot option. We can use--halt option in order to halt and do not restart the system like below.

reboot命令实际上是poweroff命令与--reboot选项的同义词。 我们可以使用--halt选项来停止并且不重新启动系统,如下所示。

$ sudo reboot --halt

  • To shutdown system –halt parameter should be provided.

    要关闭系统,应提供-halt参数。

关机命令 (Shutdown Command)

The most popular and well known command is shutdown command. This command automatically shutdown the current system.

最受欢迎的命令是shutdown命令。 该命令自动关闭当前系统。

$ sudo shutdown
给定时间后关闭系统 (Shutdown System After Given Time)

We can set timer to shutdown system. In this example we will shutdown the system after 5 minutes the command issued.

我们可以设置定时器来关闭系统。 在此示例中,我们将在发出命令5分钟后关闭系统。

$ sudo shutdown -h +5
关闭前向系统用户发送消息 (Send Message To The System Users Before Shutdown)

We can send message to the system users with shutdown command. This is useful is we give some time and send message to provide this information to the system users. In this example we will send the message System will be shutdown after 5 minutes

我们可以使用shutdown命令将消息发送给系统用户。 这在我们花一些时间并发送消息以将这些信息提供给系统用户时很有用。 在此示例中,我们将发送消息, System will be shutdown after 5 minutes

$ sudo shutdown -h +5 "System will be shutdown after 5 minutes"

LEARN MORE  Useful Linux Commands
了解更多有用Linux命令
如何关闭Linux系统信息(How To Shutdown Linux System Infografic)
How To Shutdown Linux System Infografic

翻译自: https://www.poftut.com/shutdown-linux-system/

linux系统关掉网卡命令



推荐阅读
  • 本文介绍了一款用于自动化部署 Linux 服务的 Bash 脚本。该脚本不仅涵盖了基本的文件复制和目录创建,还处理了系统服务的配置和启动,确保在多种 Linux 发行版上都能顺利运行。 ... [详细]
  • 本文详细介绍了如何在Linux系统上安装和配置Smokeping,以实现对网络链路质量的实时监控。通过详细的步骤和必要的依赖包安装,确保用户能够顺利完成部署并优化其网络性能监控。 ... [详细]
  • 本文详细介绍了 Dockerfile 的编写方法及其在网络配置中的应用,涵盖基础指令、镜像构建与发布流程,并深入探讨了 Docker 的默认网络、容器互联及自定义网络的实现。 ... [详细]
  • 本文详细分析了Hive在启动过程中遇到的权限拒绝错误,并提供了多种解决方案,包括调整文件权限、用户组设置以及环境变量配置等。 ... [详细]
  • 解决微信电脑版无法刷朋友圈问题:使用安卓远程投屏方案
    在工作期间想要浏览微信和朋友圈却不太方便?虽然微信电脑版目前不支持直接刷朋友圈,但通过远程投屏技术,可以轻松实现在电脑上操作安卓设备的功能。 ... [详细]
  • 在维护公司项目时,发现按下手机的某个物理按键后会激活相应的服务,并在屏幕上模拟点击特定坐标点。本文详细介绍了如何使用ADB Shell Input命令来模拟各种输入事件,包括滑动、按键和点击等。 ... [详细]
  • 本文详细介绍了如何在Ubuntu系统中下载适用于Intel处理器的64位版本,涵盖了不同Linux发行版对64位架构的不同命名方式,并提供了具体的下载链接和步骤。 ... [详细]
  • 本文介绍如何通过更改软件源来提前体验Ubuntu 8.10,包括详细的配置步骤和相关注意事项。 ... [详细]
  • 本文详细介绍了Linux系统中init进程的作用及其启动过程,解释了运行级别的概念,并提供了调整服务启动顺序的具体步骤和实例。通过了解这些内容,用户可以更好地管理系统的启动流程和服务配置。 ... [详细]
  • 本文介绍如何在现有网络中部署基于Linux系统的透明防火墙(网桥模式),以实现灵活的时间段控制、流量限制等功能。通过详细的步骤和配置说明,确保内部网络的安全性和稳定性。 ... [详细]
  • 在Python开发过程中,随着项目数量的增加,不同项目依赖于不同版本的库,容易引发依赖冲突。为了避免这些问题,并保持开发环境的整洁,可以使用Virtualenv和Virtualenvwrapper来创建和管理多个隔离的Python虚拟环境。 ... [详细]
  • PostgreSQL 10 离线安装指南
    本文详细介绍了如何在无法联网的服务器上进行 PostgreSQL 10 的离线安装,并涵盖了从下载安装包到配置远程访问的完整步骤。 ... [详细]
  • 并发编程 12—— 任务取消与关闭 之 shutdownNow 的局限性
    Java并发编程实践目录并发编程01——ThreadLocal并发编程02——ConcurrentHashMap并发编程03——阻塞队列和生产者-消费者模式并发编程04——闭锁Co ... [详细]
  • 本文详细介绍了Akka中的BackoffSupervisor机制,探讨其在处理持久化失败和Actor重启时的应用。通过具体示例,展示了如何配置和使用BackoffSupervisor以实现更细粒度的异常处理。 ... [详细]
  • 本文深入探讨了SQL数据库中常见的面试问题,包括如何获取自增字段的当前值、防止SQL注入的方法、游标的作用与使用、索引的形式及其优缺点,以及事务和存储过程的概念。通过详细的解答和示例,帮助读者更好地理解和应对这些技术问题。 ... [详细]
author-avatar
手机用户2502857731
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有