1. 程式人生 > >centos 7修改系統時間

centos 7修改系統時間

1.檢視時間

[[email protected] ~]# date 

Wed May 30 22:24:35 EDT 2018   #和顯示時間有誤差

2.同步網路伺服器時間

[[email protected] ~]# ntpdate 218.186.3.36

3.使用tzselect

[[email protected] ~]# tzselect 

選擇5) Asia -->  9) China ----> 1) Beijing Time 

Therefore TZ='Asia/Shanghai' will be used.
Local time is now:Thu May 31 10:24:21 CST 2018.
Universal Time is now:Thu May 31 02:24:21 UTC 2018.
Is the above information OK?
1) Yes
2) No

#? 1  #選擇1.是

4. 修改配置檔案

[[email protected] ~]# mv /etc/localtime{,.bak}

[[email protected] ~]# cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime

5.檢視

[[email protected] ~]# ntpdate cn.ntp.org.cn
31 May 10:08:23 ntpdate[54206]: adjust time server 223.113.97.99 offset 0.002774 sec

[[email protected] ~]# date
Thu May 31 09:46:20 CST 2018

相關推薦

centos 7修改系統時間

1.檢視時間[[email protected] ~]# date Wed May 30 22:24:35 EDT 2018   #和顯示時間有誤差2.同步網路伺服器時間[[email protected] ~]# ntpdate 218.186.3.36

CentOS 7 修改日誌時間戳格式

times efault 默認 pre systemctl oot ESS hostname for 默認的時間戳格式是Jul 14 13:30:01 localhost systemd: Starting Session 38 of user root.看著不是很方便,現

centos 7 修改系統螢幕解析度

   centos 7 修改系統螢幕解析度,命令方式和圖形方式的修改方法。 命令:xrandr         通過命令 xrandr 修改系統的解析度,輸入xrandr: bash [

Centos永久修改系統時間

Centos系統,必須同時修改系統時間和硬體時間,才可以保證修改有效,單純的使用date命令修改系統時間,是立即生效,重啟後系統還原。具體操作如下: 1.date {檢視目前本地的時間} 2.hwclock --show {檢視硬體的時間} 3.如果硬體時間和系統時間不同,那就對硬體的時間進

CentOS 7 檢視系統時間、更新系統時間

一、檢視系統時間、硬體時間 # date // 檢視系統時間 #hwclock // 檢視硬體時間 二、時間伺服器上的時間同步的方法 安裝ntpdate工具 # yum -y

Centos 7修改系統預設編碼

centos 6修改 /etc/sysconfig/i18n 立即生效 source /etc/sysconfig/i18n由於centos 7 沒有這個檔案:修改 /etc/locale.conf 立

centos 7修改系統支持中文編碼

code lc_all locale telephone 永久 use style 中文編碼 numeric 2019-03-14 查看系統現支持編碼 }[root@web dc2-user]#locale LANG=en_US.UTF-8 LC_CT

centos 7修改系統時間方法

1、問題產生 昨晚後臺的圖片服務掛了,折騰之後發現是伺服器的時間不對,於是看了一下Linux下面關於時區與時間相關的命令 [root@root:~] $ date -R Tue, 31 Mar 2015 13:58:25 +0400 [root@root:~] $

CentOS修改系統時間

.com href www 操作 ron 指向 usr linu set 操作: 1 2 date –s ‘1987-05-02 10:10:10‘ clock –w //將日期寫入CMOS 補充: 修改Linux時間一般涉及到3個命令:

CentOS修改系統時間為北京時間的命令

1.刪除本地時間並設定時區為上海 rm -rf /etc/localtime  ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime 2.用date看下時間是否正確,不正確的話繼續下面的操作,使用ntp同步一下時間 3

CentOS 7.4系統修改網絡卡名稱

背景 最近在使用CentOS 7.4系統,然後就要做一些小實驗,發現當前系統網絡卡名,變成什麼ens33。看著不習慣,於是就想改成ethX的格式,原諒我的強迫症。 嘗試 因為之前一直玩的是SUSE系統,所有理所應當的是想通過udev規則來實現,然後就到

Centos 7 修改時間問題

更改時間遇到報錯處理: [[email protected] ccj]# timedatectl set-time 2018-08-06 Failed to set time: Automatic time synchronization is enabled [[emai

CentOS 7 修改開機等待時間

找到 /boot/grub2 下的 grub.cfg 找到並修改下面的程式碼:   fi } terminal_output console if [ x$feature_timeout_style = xy ] ; then   set timeout_style=

Centos下s如何永久修改系統時間

 使用Centos,遇到本地時間對不上,直接敲命令:date -s "2014-12-25  15:15:15"是立即生效了,但是重啟後,系統時間還是原來的。  後面經過查詢資料,做個小結.  我的Centos是安裝在虛擬機器上。在虛擬機器有分系統時間和硬體時間。修改了其一

Linux修改系統時間

ive etc cal 記得 設置時間 har this 兩個 格式 本文轉摘自『IT學習者』http://www.t086.com/article/4386 修改linux的時間可以使用date指令 修改日期: 時間設定成2009年5月10日的命令如下: #date

[CentOS 7系列]系統服務管理

cron chkconfig 1、任務計劃cron是一個linux下的定時執行工具(相當於windows下的scheduled task),可以在無需人工幹預的情況下定時地運行任務task。cron服務提供crontab命令來設定cron服務的。▎常用參數:命令作用crontab -u設定某個用戶的c

[CentOS 7系列]系統日誌

日誌一、系統日誌1、/var/log/messages 系統的日誌(服務,系統,軟件等)[[email protected]/* */ ~]# tail -5 /var/log/messages Jul 20 17:42:44 juispan NetworkManager[520]: <in

CentOS 6和CentOS 7管理系統服務的區別

service systemctl 管理系統服務CentOS 6CentOS 7(firewalld.service可簡寫成firewalldhttpd.service可簡寫成httpd)關閉防火墻# service iptables stop# systemctl stop firewalld.se

linux系統修改系統時間與時區

log beijing 重新登錄 重啟 bios 安裝 hctosys bsp windows   有裝過Linux系統的人,可能都會有這樣的經歷,就是該機器安裝windows系統時,時間正確,但是安裝了linux系統後,盡管時區選擇正確,也會發現系統時間不對。這是由於

Linux運維系列一 CentOS 7桌面系統加入到Samba4 AD域環境中

samba4 ads microsoft 解析器 集成 文章 groups 程序 用戶和用戶組 這篇文章講述了如何使用 Authconfig-gtk 工具將 CentOS 7 桌面系統加入到 Samba4 AD 域環境中,並使用域帳號登錄到 CentOS 系統。 要求 1、