mirror of
https://github.com/clearlinux/clear-linux-documentation.git
synced 2026-04-29 03:23:42 +00:00
168 lines
7.9 KiB
HTML
168 lines
7.9 KiB
HTML
|
|
<!DOCTYPE html>
|
|
|
|
<html lang="en" data-content_root="../../">
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
|
|
<title>Set system time — Documentation for Clear Linux* project</title>
|
|
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=fa44fd50" />
|
|
<link rel="stylesheet" type="text/css" href="../../_static/bizstyle.css?v=5283bb3d" />
|
|
<link rel="stylesheet" type="text/css" href="../../_static/copybutton.css?v=76b2166b" />
|
|
|
|
<script src="../../_static/documentation_options.js?v=5929fcd5"></script>
|
|
<script src="../../_static/doctools.js?v=9bcbadda"></script>
|
|
<script src="../../_static/sphinx_highlight.js?v=dc90522c"></script>
|
|
<script src="../../_static/clipboard.min.js?v=a7894cd8"></script>
|
|
<script src="../../_static/copybutton.js?v=a56c686a"></script>
|
|
<script src="../../_static/bizstyle.js"></script>
|
|
<link rel="canonical" href="https://clearlinux.github.io/clear-linux-documentation/guides/network/time.html" />
|
|
<link rel="icon" href="../../_static/favicon.ico"/>
|
|
<link rel="author" title="About these documents" href="../../about.html" />
|
|
<link rel="index" title="Index" href="../../genindex.html" />
|
|
<link rel="search" title="Search" href="../../search.html" />
|
|
<link rel="next" title="Remote-desktop to a host using VNC" href="vnc.html" />
|
|
<link rel="prev" title="Proxy Configuration" href="proxy.html" />
|
|
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
|
|
<!--[if lt IE 9]>
|
|
<script src="_static/css3-mediaqueries.js"></script>
|
|
<![endif]-->
|
|
</head><body>
|
|
<div class="related" role="navigation" aria-label="Related">
|
|
<h3>Navigation</h3>
|
|
<ul>
|
|
<li class="right" style="margin-right: 10px">
|
|
<a href="../../genindex.html" title="General Index"
|
|
accesskey="I">index</a></li>
|
|
<li class="right" >
|
|
<a href="vnc.html" title="Remote-desktop to a host using VNC"
|
|
accesskey="N">next</a> |</li>
|
|
<li class="right" >
|
|
<a href="proxy.html" title="Proxy Configuration"
|
|
accesskey="P">previous</a> |</li>
|
|
<li class="nav-item nav-item-0"><a href="../../index.html">Documentation for Clear Linux* project</a> »</li>
|
|
<li class="nav-item nav-item-1"><a href="../index.html" accesskey="U">Guides</a> »</li>
|
|
<li class="nav-item nav-item-this"><a href="">Set system time</a></li>
|
|
</ul>
|
|
</div>
|
|
|
|
<div class="document">
|
|
<div class="documentwrapper">
|
|
<div class="bodywrapper">
|
|
<div class="body" role="main">
|
|
|
|
<section id="set-system-time">
|
|
<span id="time"></span><h1>Set system time<a class="headerlink" href="#set-system-time" title="Link to this heading">¶</a></h1>
|
|
<p>This guide describes how to reset the time in your Clear Linux* OS system when
|
|
the default <abbr title="Network Time Protocol">NTP</abbr> servers cannot be reached.</p>
|
|
<p>Clear Linux OS uses the <cite>systemd-timesyncd.service</cite> daemon to synchronize time.</p>
|
|
<ol class="arabic">
|
|
<li><p>Install the <strong class="command">sysadmin-basic</strong> bundle.</p>
|
|
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sudo<span class="w"> </span>swupd<span class="w"> </span>bundle-add<span class="w"> </span>sysadmin-basic
|
|
</pre></div>
|
|
</div>
|
|
</li>
|
|
<li><p>Set your time zone. This example uses Los Angeles.</p>
|
|
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>timedatectl<span class="w"> </span>set-timezone<span class="w"> </span>America/Los_Angeles
|
|
</pre></div>
|
|
</div>
|
|
<div class="admonition note">
|
|
<p class="admonition-title">Note</p>
|
|
<p>To see a list of time zones, use the command:
|
|
<strong class="command">timedatectl list-timezones | grep <locale></strong></p>
|
|
</div>
|
|
</li>
|
|
<li><p>Create a <code class="file docutils literal notranslate"><span class="pre">/etc/systemd/</span></code> directory.</p>
|
|
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sudo<span class="w"> </span>mkdir<span class="w"> </span>-p<span class="w"> </span>/etc/systemd/
|
|
</pre></div>
|
|
</div>
|
|
</li>
|
|
<li><p>Create a new file named <code class="file docutils literal notranslate"><span class="pre">/etc/systemd/timesyncd.conf</span></code> and enter the
|
|
following text.</p>
|
|
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="go">[Time]</span>
|
|
<span class="go">NTP=<Preferred Server></span>
|
|
<span class="go">FallbackNTP=<backup server 1> <backup server 2></span>
|
|
</pre></div>
|
|
</div>
|
|
</li>
|
|
<li><p>Enable the <cite>systemd-timesyncd</cite> service.</p>
|
|
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sudo<span class="w"> </span>timedatectl<span class="w"> </span>set-ntp<span class="w"> </span><span class="nb">true</span>
|
|
</pre></div>
|
|
</div>
|
|
</li>
|
|
</ol>
|
|
<div class="admonition note">
|
|
<p class="admonition-title">Note</p>
|
|
<p>To check the service status, use the <strong class="command">timedatectl status</strong> command.</p>
|
|
<p>To restart the <cite>timesyncd</cite> daemon, enter <strong class="command">systemctl restart
|
|
systemd-timesyncd</strong> into your terminal emulator.</p>
|
|
</div>
|
|
<p><strong>Congratulations!</strong> You successfully set up the time in your Clear Linux OS system.</p>
|
|
</section>
|
|
|
|
|
|
<div class="clearer"></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="sphinxsidebar" role="navigation" aria-label="Main">
|
|
<div class="sphinxsidebarwrapper">
|
|
<p class="logo"><a href="../../index.html">
|
|
<img class="logo" src="../../_static/clearlinux.png" alt="Logo of Clear Linux* Project Docs"/>
|
|
</a></p>
|
|
<div>
|
|
<h4>Previous topic</h4>
|
|
<p class="topless"><a href="proxy.html"
|
|
title="previous chapter">Proxy Configuration</a></p>
|
|
</div>
|
|
<div>
|
|
<h4>Next topic</h4>
|
|
<p class="topless"><a href="vnc.html"
|
|
title="next chapter">Remote-desktop to a host using VNC</a></p>
|
|
</div>
|
|
<div role="note" aria-label="source link">
|
|
<h3>This Page</h3>
|
|
<ul class="this-page-menu">
|
|
<li><a href="../../_sources/guides/network/time.rst.txt"
|
|
rel="nofollow">Show Source</a></li>
|
|
</ul>
|
|
</div>
|
|
<search id="searchbox" style="display: none" role="search">
|
|
<h3 id="searchlabel">Quick search</h3>
|
|
<div class="searchformwrapper">
|
|
<form class="search" action="../../search.html" method="get">
|
|
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
|
|
<input type="submit" value="Go" />
|
|
</form>
|
|
</div>
|
|
</search>
|
|
<script>document.getElementById('searchbox').style.display = "block"</script>
|
|
</div>
|
|
</div>
|
|
<div class="clearer"></div>
|
|
</div>
|
|
<div class="related" role="navigation" aria-label="Related">
|
|
<h3>Navigation</h3>
|
|
<ul>
|
|
<li class="right" style="margin-right: 10px">
|
|
<a href="../../genindex.html" title="General Index"
|
|
>index</a></li>
|
|
<li class="right" >
|
|
<a href="vnc.html" title="Remote-desktop to a host using VNC"
|
|
>next</a> |</li>
|
|
<li class="right" >
|
|
<a href="proxy.html" title="Proxy Configuration"
|
|
>previous</a> |</li>
|
|
<li class="nav-item nav-item-0"><a href="../../index.html">Documentation for Clear Linux* project</a> »</li>
|
|
<li class="nav-item nav-item-1"><a href="../index.html" >Guides</a> »</li>
|
|
<li class="nav-item nav-item-this"><a href="">Set system time</a></li>
|
|
</ul>
|
|
</div>
|
|
<div class="footer" role="contentinfo">
|
|
© Copyright 2022 Intel Corporation. All Rights Reserved..
|
|
Last updated on Nov 04, 2024.
|
|
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 8.1.3.
|
|
</div>
|
|
</body>
|
|
</html> |