热门标签 | 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系统关掉网卡命令



推荐阅读
  • 本文详细介绍了Akka中的BackoffSupervisor机制,探讨其在处理持久化失败和Actor重启时的应用。通过具体示例,展示了如何配置和使用BackoffSupervisor以实现更细粒度的异常处理。 ... [详细]
  • Windows服务与数据库交互问题解析
    本文探讨了在Windows 10(64位)环境下开发的Windows服务,旨在定期向本地MS SQL Server (v.11)插入记录。尽管服务已成功安装并运行,但记录并未正确插入。我们将详细分析可能的原因及解决方案。 ... [详细]
  • dotnet 通过 Elmish.WPF 使用 F# 编写 WPF 应用
    本文来安利大家一个有趣而且强大的库,通过F#和C#混合编程编写WPF应用,可以在WPF中使用到F#强大的数据处理能力在GitHub上完全开源Elmis ... [详细]
  • 本文深入探讨了SQL数据库中常见的面试问题,包括如何获取自增字段的当前值、防止SQL注入的方法、游标的作用与使用、索引的形式及其优缺点,以及事务和存储过程的概念。通过详细的解答和示例,帮助读者更好地理解和应对这些技术问题。 ... [详细]
  • 深入解析JVM垃圾收集器
    本文基于《深入理解Java虚拟机:JVM高级特性与最佳实践》第二版,详细探讨了JVM中不同类型的垃圾收集器及其工作原理。通过介绍各种垃圾收集器的特性和应用场景,帮助读者更好地理解和优化JVM内存管理。 ... [详细]
  • 深入解析Android自定义View面试题
    本文探讨了Android Launcher开发中自定义View的重要性,并通过一道经典的面试题,帮助开发者更好地理解自定义View的实现细节。文章不仅涵盖了基础知识,还提供了实际操作建议。 ... [详细]
  • 本文详细记录了在基于Debian的Deepin 20操作系统上安装MySQL 5.7的具体步骤,包括软件包的选择、依赖项的处理及远程访问权限的配置。 ... [详细]
  • Explore a common issue encountered when implementing an OAuth 1.0a API, specifically the inability to encode null objects and how to resolve it. ... [详细]
  • 本文介绍了一款用于自动化部署 Linux 服务的 Bash 脚本。该脚本不仅涵盖了基本的文件复制和目录创建,还处理了系统服务的配置和启动,确保在多种 Linux 发行版上都能顺利运行。 ... [详细]
  • 本文介绍如何通过更改软件源来提前体验Ubuntu 8.10,包括详细的配置步骤和相关注意事项。 ... [详细]
  • 本文详细介绍了Debian及其衍生发行版中如何通过/etc/network/interfaces文件进行网络接口的配置,对比了Red Hat系系统的不同之处,并提供了多种常见配置示例及解析。 ... [详细]
  • 本文介绍了一种根据用户选择动态切换屏幕界面的方法,通过定义不同的选择块(Selection Block),实现灵活的用户交互体验。 ... [详细]
  • 本文探讨了使用C#在SQL Server和Access数据库中批量插入多条数据的性能差异。通过具体代码示例,详细分析了两种数据库的执行效率,并提供了优化建议。 ... [详细]
  • 本文介绍如何使用MFC和ADO技术调用SQL Server中的存储过程,以查询指定小区在特定时间段内的通话统计数据。通过用户界面选择小区ID、开始时间和结束时间,系统将计算并展示小时级的通话量、拥塞率及半速率通话比例。 ... [详细]
  • 搭建Jenkins、Ant与TestNG集成环境
    本文详细介绍了如何在Ubuntu 16.04系统上配置Jenkins、Ant和TestNG的集成开发环境,涵盖从安装到配置的具体步骤,并提供了创建Windows Slave节点及项目构建的指南。 ... [详细]
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社区 版权所有