kafka 命令重新启动

When you’re in the same room as a server, shutting it down or rebooting it is simple. You could hold the power button or even unplug the whole machine. Not only are these solutions inelegant, they have the potential to corrupt your data and potentially damage your hardware! They also don’t work when you’re logged into your favorite remote server.

当您与服务器位于同一房间时,关闭或重新启动它很简单。 您可以按住电源按钮,甚至拔下整个机器的电源。 这些解决方案不仅笨拙,而且还可能破坏您的数据并可能损坏您的硬件! 当您登录到喜欢的远程服务器时,它们也不起作用。

Depending on your hosting provider, you very well may have a nice GUI interface at your disposal, completely with a shiny red button to shutdown or reboot the machine. It’s a sufficient solution, but doesn’t necessarily scale across different hosting providers.

根据主机提供商的不同,您可能会拥有一个不错的GUI界面,完全带有一个闪亮的红色按钮来关闭或重新启动计算机。 这是一个足够的解决方案,但不一定跨不同的托管服务提供商扩展。

Knowing how to do things on the command-line allows you to be as stack agnostic as possible. You can switch easily between hosting providers and always have the same consistent set of tools at your disposal. This flexibility comes in extra handy when you’re working with a brand new stack that you’re not familiar with.

知道如何在命令行上执行操作可以使您尽可能地与堆栈无关。 您可以在托管服务提供商之间轻松切换,并始终拥有相同的一致工具集。 当您使用不熟悉的全新堆栈时,这种灵活性特别方便。

入门 (Getting started)

The commands discussed in this article, shutdown and reboot do exactly as their names imply. They will shut down or reboot your machine. Because these are somewhat destructive commands, if you run them locally, be ready for your system to system to shut down or reboot.

本文讨论的命令, shutdownreboot与它们的名称所暗示的完全相同。 他们将关闭或重新启动计算机。 因为这些命令具有破坏性,所以如果在本地运行它们,请准备好使系统关闭或重新引导。

Using a remote development or staging server running a Unix-like operating system (like Linux) would be an ideal scenario. Because you will in fact take your server off line with these commands, I wouldn’t recommend running them on a production server unless you really want to reboot the box.

使用运行类似Unix操作系统(例如Linux)的远程开发或登台服务器将是理想的方案。 因为实际上您将使服务器与这些命令脱钩,所以除非您确实要重新启动该框,否则我建议您不要在生产服务器上运行它们。

The following commands will more than likely require elevated super-user privileges to run. If you receive an error about a command not being found, just try it again with sudo.

以下命令很可能需要提升的超级用户特权才能运行。 如果收到关于找不到命令的错误,请使用sudo再次尝试。

If you don’t have super-user privilege on the machine you’re on, you more than likely won’t be able to shut it down or reboot it.

如果您所在的计算机没有超级用户特权,则很有可能将其关闭或重新启动。

关机 (Shutting down)

Shutting down a system can be done with the shutdown command, in it’s simplest form, without any arguments:

可以使用shutdown命令以最简单的形式关闭系统,而无需任何参数:

$ shutdown # Graceful shutdown in 1 minute

Without any arguments, the shutdown command will schedule the shutdown for a minute out from the current time. Because it’s scheduled in the future, you have a window of opportunity to cancel the shutdown by way of the -c argument:

如果不带任何参数, shutdown命令将安排关机时间比当前时间晚一分钟。 因为它是将来计划的,所以您有机会通过-c参数取消关闭:

$ shutdown -c # Cancel a scheduled shutdown

Crisis averted!

避免危机!

You may have noticed that a broadcast message was issued when you ran the first shutdown command. That’s the wall message, and it’s issued to all of the users that are currently logged into the system.

您可能已经注意到,当您运行第一个shutdown命令时,发出了一条广播消息。 这是墙壁消息,它会发给当前登录到系统的所有用户。

The time of the shutdown can be scheduled, as well as the content of the wall message that is presented to your users:

可以安排关闭时间以及显示给您的用户的挂墙消息的内容:

$ shutdown now "Cya later alligator" # Immediately shut down
$ shutdown +5 "Cya later alligator"  # Shutdown in 5 minutes

Because the arguments are passed in order and without additional --flags to indicate what the values are, they must be passed in a specific order. That means you can’t customize the wall message without also specifying a time.

因为参数是按顺序传递的,并且没有附加的--flags来指示值是什么,所以必须按特定的顺序传递它们。 这意味着您不能在不指定时间的情况下自定义留言。

重新启动 (Rebooting)

If you are just looking for a quick and easy way to reboot a server, the reboot command is about as easy as it comes:

如果您只是在寻找一种快速轻松地重启服务器的方法,那么reboot命令就和它一样简单:

$ reboot    # Graceful restart
$ reboot -f # Forceful, like holding the power button

In tune with the Unix Philosophy, the reboot command does what it’s name implies and not much else.

与Unix Philosophy协调 , reboot命令执行了其名称所隐含的内容,仅此而已。

The shutdown command on the other hand, actually does a bit more than the “shutdown” name infers, by allowing you to use it to reboot a machine as well as shut it down.

另一方面, shutdown命令实际上比“ shutdown”名称推断的功能要多得多,它允许您使用它来重新启动计算机以及将其关闭。

Why this is important is that while the reboot command is quick and gets the job done, using the shutdown command to restart your machine gives you the added benefit of being able to schedule things as well as edit the wall message.

之所以如此重要,是因为尽管reboot命令很快并且可以完成工作,但是使用shutdown命令重新启动计算机可以为您带来更多好处,使您能够安排工作以及编辑留言。

To tell the shutdown command to reboot instead of just shutting down, pass in the -r or --reboot argument, along with any other options:

要告诉shutdown命令重新启动而不只是关闭,请传递-r--reboot参数以及任何其他选项:

$ shutdown --reboot                       # Reboot in 1 minute
$ shutdown -r now "After while crocodile" # Immediately reboot
$ shutdown -r +5 "After while crocodile"  # Reboot in 5 minutes

Similar to how we canceled a full shutdown earlier, another added benefit over reboot is that you can also cancel a reboot via shutdown by calling it again with the -c argument:

与我们之前取消完全关闭的方式类似,与reboot ,另一个额外的好处是,您还可以通过使用-c参数再次调用重新启动来通过shutdown来取消重新启动:

$ shutdown -c # Cancel a scheduled shutdown (or reboot!)

翻译自: https://www.digitalocean.com/community/tutorials/workflow-command-line-basics-shutdown-reboot

kafka 命令重新启动

kafka 命令重新启动_命令行基础知识:关闭和重新启动相关推荐

  1. kettle对字符串去除空格_整理|ABAP基础知识二:常用字符串处理

    常用字符串处理 上一期整理了ABAP的数据类型和定义,今天我们整理一下开发过程中常见的字符串处理命令.虽然说这些基础知识对于已经熟练使用Ctrl c + Ctrl v的资深码农来说过于简单.但是对于一 ...

  2. 命令行 上下箭头符号_命令行基础知识:符号链接

    命令行 上下箭头符号 Symbolic links allow you to links files and directories to other files and directories. T ...

  3. 电脑的基础知识_电脑的基础知识大全,你确定都知道?

    电脑的基础知识大全,你确定都知道? 一.软件系统 软件系统包括:操作系统.应用软件等.应用软件中电脑行业的管理软件,IT电脑行业的发展必备利器,电脑行业的erp软件. 二.硬件系统 硬件系统包括:机箱 ...

  4. mysql 算子 谓词_[SQL] SQL 基础知识梳理(六)- 函数、谓词、CASE 表达式

    SQL 基础知识梳理(六)-  函数.谓词.CASE 表达式 目录 函数 谓词 CASE 表达式 一.函数 1.函数:输入某一值得到相应输出结果的功能,输入值称为"参数",输出值称 ...

  5. java代码规范插件_「Java基础知识」代码规范插件怎么用

    原标题:「Java基础知识」代码规范插件怎么用 在开发中,好的编程风格可以提升团队合作能力,提升开发的效率,但是每个人都有自己的编程习惯,如何能够将大家的编程风格统一,这个在团队中也很重要; 在Jav ...

  6. 串口发送tcp数据 源端口号_三分钟基础知识:用动画给面试官解释 TCP 三次握手过程...

    作者 |  小鹿 来源 |  小鹿动画学编程 写在前边 TCP 三次握手过程对于面试是必考的一个,所以不但要掌握 TCP 整个握手的过程,其中有些小细节也更受到面试官的青睐. 对于这部分掌握以及 TC ...

  7. 电脑的基础知识_电脑入门基础知识

    电脑入门基础知识 学习电脑应该先了解电脑的基本的组件,然后学习操作,包括键盘.鼠标的使用,能基本使用操作系统,再学习打字. 作为一个电脑小白,想要学习电脑,首先要知道如何操作,学习打字,接着就是熟练使 ...

  8. python的django介绍_【Python基础知识】Django框架简介

    很多初学Python的小伙伴不知道该从何开始学起,其实零基础学习的话可以先学习一些Python基础知识,等基础打牢之后再去接触更加深入的技术,接下来小编就为大家简单介绍一下有关于 Django框架内容 ...

  9. 加减法叫做什么运算_小学四则运算基础知识,赶快给孩子存下吧!

    计算能力是小学数学学习的基础.期末考试快来了,今天小猿老师为大家分享小学阶段关于四则运算的基础知识. 趁着期末考试前,帮孩子们查漏补缺,提高计算能力,争取期末表现得更好哦~家长们收藏吧. 运算定律 加 ...

最新文章

  1. 运维自动化------ansible搭建
  2. Java基础篇:final关键字
  3. 【iCore4 双核心板_ARM】例程二十:LWIP_TCP_CLIENT实验——以太网数据传输
  4. java按行写入txt文件内容_JAVA编程:读文件,按行输出文件内容
  5. Cocos2d-x v2.2.2版本+Win7+VS2010环境搭建
  6. 充电原理_电动汽车充电桩如何设置?充电桩原理介绍
  7. 转: Jenkins+Gradle实现android开发持续集成、打包
  8. 网易严选搜索推荐实践之:“全能选手”召回表征算法实践.pdf(附下载链接)...
  9. Activiti的历史记录级别
  10. ARM64 Linux 内核页表的块映射
  11. 2019最新私塾在线高级java软件架构师培训项目实战(完整)
  12. matlab蒙特卡洛法求概率,基于某MATLAB的蒙特卡洛方法对可靠度的计算.doc
  13. Kotlin入门(27)文件读写操作
  14. Dynamic Label Assignment for Object Detection by Combining Predicted and Anchor IoUs
  15. 网吧服务器哪个好稳定,网吧服务器不应盲目追高新:够用稳定就好
  16. esp8266基本使用 - GET|POST
  17. Python+Pyecharts实现1995~2020世界人口分析报告
  18. Android实现平板的类股票列表联动
  19. iOS 利用openCV拼接照片实现拍摄全景照片
  20. APPScan手动探索

热门文章

  1. 再说for in循环
  2. 我所见的沈阳世界园艺博览会
  3. 软文营销拒绝一成不变用故事建立情感依恋
  4. 链接和二维码被微信拦截(被封锁、被屏蔽、被和谐)的最新解决方法——MaxJump
  5. 机器学习中的距离公式
  6. linux 无法加载动态库,51CTO博客-专业IT技术博客创作平台-技术成就梦想
  7. App怎么推广最有效
  8. 需求分析挑战之旅(疯狂的订餐系统)(2)——需求分析的大道理
  9. Google Play Console beta 版全新发布
  10. 读文章笔记(八):多模态情感分析数据集整理