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 modify the system time of linux

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly introduces "how to modify the system time of linux". In the daily operation, I believe many people have doubts about how to modify the system time of linux. The editor consulted all kinds of data and sorted out a simple and easy-to-use method of operation. I hope it will be helpful to answer the doubt of "how to modify the system time of linux". Next, please follow the editor to study!

Modify the linux system time method: 1, use the date command to set the date and time of the system, syntax "date-s" year, month, day and hour: minutes and seconds "; 2, execute the" hwclock-- systohc "command to save the settings, shut down and restart.

The operating environment of this tutorial: linux5.9.8 system, Dell G3 computer.

Modify system time under Linux

In Linux, you can use the date command to modify the system time.

The date command can be used to display or set the date and time of the system.

For example, if we set the time to 18:30:50 on 2021-07-12, we can set the date first.

Date-s 20210712

Reschedule

Date-s 18:30:50

You can also use the command directly in one step

Date-s "20210712 18:30:50"

When the time is set, it will be saved. It's okay if you turn it off normally. The system will be saved once when the system is turned off, but if you may not shut down properly, you can save the settings first.

Hwclock-systohc

Yes, that's what it says. Most of the words on the Internet are

Clock-w

Or

Hwclock-w

If you analyze it carefully, you will know that clock is the soft link of hwclock. The parameter-w is not mentioned at all in hwclock's help and man. I don't know what year-w is written.

At this point, the study on "how to modify the system time of linux" 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: 0

*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