Ubuntu14 关机重启、版本、网络

时光总嘲笑我的痴心妄想 提交于 2019-12-05 13:47:04

 

关机、重启:

立即关机:halt、poweroff、shutdown -h now

延迟关机:shutdown -h 10  十分钟后关机

立即重启:reboot、shutdown -r now

延迟重启:shutdown -r 10 十分钟后重启、shutdown -r 20:35 定点重启

取消:shutdown -c

 

Ubuntu14 版本查询

xzx@git:~$ lsb_release -a        LSB是Linux Standard Base的缩写,lsb_release命令用来显示LSB和特定版本的相关信息
No LSB modules are available.
Distributor ID:    Ubuntu        类别是ubuntu
Description:    Ubuntu 14.04.6 LTS  16年3月发布的稳定版本,LTS是Long Term Support:长时间支持版本,支持周期长达三至五年
Release:    14.04            发行版本号
Codename:    trusty           ubuntu的代号名称

 

xzx@git:~$ uname -a  查看系统相关信息
Linux 内核名称git  主机名4.4.0-142-generic 内核发行号#168~14.04.1-Ubuntu SMP Sat Jan 19 11:26:28 UTC 2019 内核版本号x86_64 机器硬件名称,即操作系统位数x86_64 处理器类型x86_64 硬件平台GNU/Linux 操作系统

 

xzx@git:~$ cat /proc/version
Linux version 4.4.0-142-generic (buildd@lcy01-amd64-006)   linux内核版本号(gcc version 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04.4) )     gcc编译器版本号、Ubuntu版本号#168~14.04.1-Ubuntu SMP Sat Jan 19 11:26:28 UTC 2019       内核版本号

 

Ubuntu14 重启

执行service networking restart 报错!(需要root权限才可以正常运行)xzx@git:~$ service networking restart
stop: Rejected send message, 1 matched rules; type="method_call", sender=":1.14" (uid=1000 pid=1576 comm="stop networking ") interface="com.ubuntu.Upstart0_6.Job" member="Stop" error name="(unset)" requested_reply="0" destination="com.ubuntu.Upstart" (uid=0 pid=1 comm="/sbin/init ")
切换到root用户下,执行service networking restart,依然报错!Ubuntu14版已经不支持使用service对网络进行停止重启。
xzx@git:~$ su root
Password: 
root@git:/home/xzx#  service networking restart
stop: Job failed while stopping
start: Job is already running: networking
正确的使用方法:ifdown eth0 && ifup eth0
root@git:/home/xzx# ifdown eth0 && ifup eth0
Internet Systems Consortium DHCP Client 4.2.4
Copyright 2004-2012 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/eth0/08:00:27:ef:72:ec
Sending on   LPF/eth0/08:00:27:ef:72:ec
Sending on   Socket/fallback
DHCPRELEASE on eth0 to 10.20.6.254 port 67 (xid=0x1e6a46a7)
Internet Systems Consortium DHCP Client 4.2.4
Copyright 2004-2012 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/eth0/08:00:27:ef:72:ec
Sending on   LPF/eth0/08:00:27:ef:72:ec
Sending on   Socket/fallback
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 3 (xid=0x828e5509)
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 5 (xid=0x828e5509)
DHCPREQUEST of 10.20.6.185 on eth0 to 255.255.255.255 port 67 (xid=0x9558e82)
DHCPOFFER of 10.20.6.185 from 10.20.6.254
DHCPACK of 10.20.6.185 from 10.20.6.254
bound to 10.20.6.185 -- renewal in 32751 seconds.

 

 

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!