RedHat Linux作業系統修改時區的方法
(1)
Here is an example of changing the timezone: (Logged in as root)
In order to manually change the timezone, you can edit the /etc/sysconfig/clockfile and then make a new soft link to /etc/localtime. Here is an example of changing the timezone manually to “America/Denver”:
1. Select the appropriate time zone from the /usr/share/zoneinfo directory. Time zone names are relative to that directory. In this case, we will select “America/Denver”
2. Edit the /etc/sysconfig/clocktext file so that it looks like this:
ZONE=”America/Denver”
UTC=true
ARC=false
Of course, this assumes that your hardware clock is running UTC time…
3. Delete the following file: /etc/localtime (backup it when you need it !)
4. Create a new soft link for /etc/localtime. Here is an example of step 3 and step 4:
# cd /etc
# ls -al localtime
lrwxrwxrwx 1 root root 39 Mar 28 07:00 localtime -> /usr/share/zoneinfo/America/Los_Angeles
# rm /etc/localtime
# ln -s /usr/share/zoneinfo/America/Denver /etc/localtime
# ls -al localtime
lrwxrwxrwx 1 root root 34 Mar 28 08:59 localtime -> /usr/share/zoneinfo/America/Denver
# date
(2)
檢視/修改Linux時區和時間
一、時區
1. 檢視當前時區
date -R
2. 修改設定時區
方法(1)
tzselect
方法(2) 僅限於RedHat Linux 和 CentOS
timeconfig
方法(3) 適用於Debian
dpkg-reconfigure tzdata
3. 複製相應的時區檔案,替換系統時區檔案;或者建立連結檔案
cp /usr/share/zoneinfo/$主時區/$次時區 /etc/localtime
在中國可以使用:
cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
3. 將當前時間和日期寫入BIOS,避免重啟後失效
hwclock -w
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/27042095/viewspace-769630/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- RedHat 7.6作業系統安裝Redhat作業系統
- Linux作業系統定時備份檔案方法Linux作業系統
- linux系統時區修改(Debian的主機和docker)LinuxDocker
- 如何區分Linux和Unix?作業系統!Linux作業系統
- 【linux】Linux作業系統Linux作業系統
- 淺談Linux作業系統的Swap交換區Linux作業系統
- Linux 作業系統Linux作業系統
- Linux作業系統Linux作業系統
- Linux作業系統關於ftp,samba,nfs的區別Linux作業系統FTPSambaNFS
- 測試修改作業系統時間&時區對oracle的影響作業系統Oracle
- 作業系統與Linux作業系統Linux
- Linux作業系統概述Linux作業系統
- 作業系統 Linux下的程式作業系統Linux
- Unix和Linux作業系統有什麼區別Linux作業系統
- 直播系統程式碼,linux date修改系統時間Linux
- 作業系統是什麼?Linux是什麼作業系統?作業系統Linux
- linux作業系統介紹Linux作業系統
- 科普帖:Linux作業系統Linux作業系統
- Linux 作業系統!開篇!!!Linux作業系統
- Linux作業系統基礎Linux作業系統
- Linux作業系統 paste命令Linux作業系統AST
- 黑客專用的 Linux 作業系統-黑客Linux作業系統
- linux是什麼作業系統 linux和windows的區別詳細說明Linux作業系統Windows
- Linux系統如何更改時間時區Linux
- 趣談Linux作業系統-劉超-極客時間Linux作業系統
- Linux作業系統支援的檔案系統有哪些?Linux作業系統
- Linux系統時間同步方法。Linux
- Linux 7 修改時區不生效Linux
- 無作業系統時的裝置驅動和有作業系統時的裝置驅動作業系統
- Linux作業系統的日誌說明Linux作業系統
- Linux作業系統的認識和使用Linux作業系統
- 適合Linux系統初學的redhat系列有哪些?LinuxRedhat
- Linux系統中Ubuntu和Redhat的差異有哪些?LinuxUbuntuRedhat
- 白話linux作業系統原理Linux作業系統
- windows10系統修改時間和日期的方法Windows
- Unix和Linux作業系統有什麼區別?看這裡!Linux作業系統
- Linux作業系統分析 | 深入理解系統呼叫Linux作業系統
- Linux系統有什麼優點?linux作業系統學習Linux作業系統
- Linux作業系統 程式之間的通訊Linux作業系統