bl双性强迫侵犯h_国产在线观看人成激情视频_蜜芽188_被诱拐的少孩全彩啪啪漫画

ubuntu系統怎么修改時區和時間

本文小編為大家詳細介紹“ubuntu系統怎么修改時區和時間”,內容詳細,步驟清晰,細節處理妥當,希望這篇“ubuntu系統怎么修改時區和時間”文章能幫助大家解決疑惑,下面跟著小編的思路慢慢深入,一起來學習新知識吧。

網站建設公司,為您提供網站建設,網站制作,網頁設計及定制網站建設服務,專注于成都企業網站定制,高端網頁制作,對崗亭等多個行業擁有豐富的網站建設經驗的網站建設公司。專業網站設計,網站優化推廣哪家好,專業網站推廣優化,H5建站,響應式網站。

在linux計算機上,有兩個時間,一個是硬件時間(bios中記錄的時間,稱為hwclock),另一個是操作系統時間(osclock)。硬件時鐘由bios電池供電,

當計算機關機后,會繼續運行,bios電池一般可使用幾年,如果沒電了,那bios中的數據會恢復出廠設置。

硬件時間與操作系統時間的交互流程

1、開機時,操作系統從bios中讀取硬件時間+時區,然后根據osclock的時區,轉換為對應的時間。然后操作系統時間與硬件時間就獨立運行,相互不影響,我們

通過應用程序獲取的時間用的都是操作系統時間。這一步是開機時os自動完成的。

2、主機運行過程中,通過ntp保證osclock與國際原子時同步,再將osclock同步到hwclock。這一步需要自己配置實現

3、關機時,osclock寫入hwclock。這一步是關機時os自動完成的。不過我們要考慮異常關機的情況,當異常關機時,osclock可能沒有寫入hwclock,這就是為什

么在第2步中將osclock定時刷入hwclock的原因。如果不定時刷入,那osclock與hwclock差距比較大時,若異常關機,osclock就丟掉了,再開機時,osclock就是

錯誤的,在第一個ntp同步到來時,osclock就一直是錯誤的。而且如果使用的是ntpd,ntpd是漸進調整,要經過多個ntp同步周期后才會將osclock調整為國際原子

時,另外,如果osclock與ntp server的時間差超過1000秒,那ntp server就不會更新osclock了。

ubuntu修改時區和時間的方法

1.首先查看時區:

codetc@webubuntu:~$ date -r
tue, 17 dec 2013 18:23:01 +0800

如果要修改時區,執行sudo tzselect

2.選擇區域:亞洲

ubuntu系統怎么修改時區和時間

codetc@webubuntu:~$ sudo tzselect
[sudo] password for codetc: 
please identify a location so that time zone rules can be set correctly.
please select a continent or ocean.
 1) africa
 2) americas
 3) antarctica
 4) arctic ocean
 5) asia
 6) atlantic ocean
 7) australia
 8) europe
 9) indian ocean
10) pacific ocean
11) none - i want to specify the time zone using the posix tz format.
#? 5

3.選擇國家:中國

ubuntu系統怎么修改時區和時間

please select a country.
 1) afghanistan      18) israel        35) palestine
 2) armenia        19) japan         36) philippines
 3) azerbaijan      20) jordan        37) qatar
 4) bahrain        21) kazakhstan      38) russia
 5) bangladesh      22) korea (north)     39) saudi arabia
 6) bhutan        23) korea (south)     40) singapore
 7) brunei        24) kuwait        41) sri lanka
 8) cambodia       25) kyrgyzstan      42) syria
 9) china         26) laos         43) taiwan
10) cyprus        27) lebanon        44) tajikistan
11) east timor      28) macau         45) thailand
12) georgia        29) malaysia       46) turkmenistan
13) hong kong       30) mongolia       47) united arab emirates
14) india         31) myanmar (burma)    48) uzbekistan
15) indonesia       32) nepal         49) vietnam
16) iran         33) oman         50) yemen
17) iraq         34) pakistan
#? 9

4.選擇時區:北京時間

ubuntu系統怎么修改時區和時間

please select one of the following time zone regions.
1) east china - beijing, guangdong, shanghai, etc.
2) heilongjiang (except mohe), jilin
3) central china - sichuan, yunnan, guangxi, shaanxi, guizhou, etc.
4) most of tibet & xinjiang
5) west tibet & xinjiang
#? 1

5.確認驗證:

ubuntu系統怎么修改時區和時間

the following information has been given:
    china
    east china - beijing, guangdong, shanghai, etc.
therefore tz='asia/shanghai' will be used.
local time is now:   tue dec 17 18:22:10 cst 2013.
universal time is now: tue dec 17 10:22:10 utc 2013.
is the above information ok?
1) yes
2) no
#? 1
you can make this change permanent for yourself by appending the line
    tz='asia/shanghai'; export tz
to the file '.profile' in your home directory; then log out and log in again.
here is that tz value again, this time on standard output so that you
can use the /usr/bin/tzselect command in shell scripts:
asia/shanghai

6.復制文件到/etc目錄下

sudo cp /usr/share/zoneinfo/asia/shanghai /etc/localtime

7.更新時間

sudo ntpdate time.windows.com

8.修改時間以后,修改硬件cmos的時間

sudo hwclock --systohc

讀到這里,這篇“ubuntu系統怎么修改時區和時間”文章已經介紹完畢,想要掌握這篇文章的知識點還需要大家自己動手實踐使用過才能領會,如果想了解更多相關內容的文章,歡迎關注創新互聯行業資訊頻道。

當前題目:ubuntu系統怎么修改時區和時間
文章路徑:http://vcdvsql.cn/article10/ggphdo.html

成都網站建設公司_創新互聯,為您提供響應式網站、定制網站、做網站、網站維護、網站改版、App開發

廣告

聲明:本網站發布的內容(圖片、視頻和文字)以用戶投稿、用戶轉載內容為主,如果涉及侵權請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網站立場,如需處理請聯系客服。電話:028-86922220;郵箱:631063699@qq.com。內容未經允許不得轉載,或轉載時需注明來源: 創新互聯

成都定制網站網頁設計