Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to change Linux system time to Beijing time on foreign mainframe

2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces "how to change the Linux system time to Beijing time on the foreign host". In the daily operation, it is believed that many people have doubts about how to change the Linux system time to Beijing time on the foreign host. The editor consulted all kinds of materials and sorted out a simple and easy-to-use operation method. I hope it will be helpful for you to answer the question of "how to change the Linux system time to Beijing time on the foreign host"! Next, please follow the editor to study!

Perhaps when using foreign vps, you may feel that the time on vps is not Beijing time, which is very awkward. Today, let's change it back to Beijing time. First, log in to your vps and use the date command to check the current time.

The code is as follows:

[root@centos ~] # date

Sun Aug 14 23:18:41 EDT 2011

Now let's change it.

The code is as follows:

[root@centos ~] # rm-rf / etc/localtime

[root@centos] # ln-s / usr/share/zoneinfo/Asia/Shanghai / etc/localtime

Then use the date command to see if your vps time has changed? Most linux vps hens allow each vps modification time! The time for watching vpsma has been changed.

The code is as follows:

[root@centos ~] # date

Mon Aug 15 11:20:00 CST 2011

If your vps time has been changed to Beijing time, you don't have to look below, if your vps time has not been changed at this time. Try the command again:

The code is as follows:

[root@centos ~] # ntpdate stdtime.sinica.edu.tw

If you prompt for this command when using ntpdate stdtime.sinica.edu.tw, just install ntpdate first.

The vps command for the centos system:

The code is as follows:

Yum-y install ntpdate ntp

Ubuntu system:

The code is as follows:

Sudo apt-get install-y ntpdate ntp

After the installation, try this command again, if not, the general situation is that the hen has made a setting not to modify your vps time.

At this point, the study on "how to change the Linux system time to Beijing time on a foreign host" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 274

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report