Linux: 硬件时钟, 系统时钟, 网络时钟, 时区修改和同步

本文涉及的产品
云解析 DNS,旗舰版 1个月
全局流量管理 GTM,标准版 1个月
公共DNS(含HTTPDNS解析),每月1000万次HTTP解析
简介: Linux: 硬件时钟, 系统时钟, 网络时钟, 时区修改和同步

目录

基础认识

常用命令

查看和修改Linux的时区

常见时区

timedatectl

时钟同步

用硬件时钟同步系统时钟:

用系统时钟同步硬件时钟:

同步网络时间

        hwclock命令

语法

查看和修改Linux的时间

时钟--详解

硬件时钟

系统时钟

时间同步

时间标准

网络时间

ntp时钟同步服务

chrony时钟同步服务

chrony 命令小册子

chronyc sources 输出结果解析

备注

ntp常用服务器



基础认识

操作系统的时间(时钟)由以下4个部分决定:

  • 时间数值
  • 时间标准(本地时间/UTC/其他)
  • 时区
  • 夏令时(DST,Daylight Saving Time,部分适用,中国已经废止)

操作系统有两个时钟,分别是硬件时钟和系统时钟,大多数操作系统的时钟管理方式如下:

硬件时钟是指主机板上的时钟设备,也就是通常可在BIOS画面设定的时钟。

系统时钟则是指kernel中的时钟。

  • 启动时根据硬件时钟设置系统时钟
  • 维护准确的系统时钟
  • 关机时根据系统时钟设置硬件时钟


常用命令

查看和修改Linux的时区

常见时区

(1)UTC 整个地球分为二十四时区,每个时区都有自己的本地时间。在国际无线电通信场合,为了统一起见,使用一个统一的时间,称为通用协调时(UTC, Universal Time Coordinated)。

(2)GMT  格林威治标准时间 (Greenwich Mean Time)指位于英国伦敦郊区的×××格林尼治天文台的标准时间,因为本初子午线被定义在通过那里的经线。(UTC与GMT时间基本相同,本文中不做区分)

(3)CST  中国标准时间 (China Standard Time)

GMT + 8 = UTC + 8 = CST

(4)DST夏令时(Daylight Saving Time) 指在夏天太阳升起的比较早时,将时间拨快一小时,以提早日光的使用。(中国不使用)

(1)UTC 整个地球分为二十四时区,每个时区都有自己的本地时间。在国际无线电通信场合,为了统一起见,使用一个统一的时间,称为通用协调时(UTC, Universal Time Coordinated)。

(2)GMT  格林威治标准时间 (Greenwich Mean Time)指位于英国伦敦郊区的×××格林尼治天文台的标准时间,因为本初子午线被定义在通过那里的经线。(UTC与GMT时间基本相同,本文中不做区分)

(3)CST  中国标准时间 (China Standard Time)

GMT + 8 = UTC + 8 = CST

(4)DST夏令时(Daylight Saving Time) 指在夏天太阳升起的比较早时,将时间拨快一小时,以提早日光的使用。(中国不使用)

1. 查看当前时区

命令 : timedatectl

2. 修改设置Linux服务器时区

timedatectl set-timezone Asia/Shanghai

[root@localhost etc]# timedatectl
               Local time: 三 2021-09-15 10:04:05 CST
           Universal time: 三 2021-09-15 02:04:05 UTC
                 RTC time: 三 2021-09-15 02:04:05
                Time zone: Asia/Shanghai (CST, +0800)
System clock synchronized: yes
              NTP service: active
          RTC in local TZ: no


timedatectl

[root@localhost ~]# timedatectl --help
timedatectl [OPTIONS...] COMMAND ...
Query or change system time and date settings.
  -h --help                Show this help message
     --version             Show package version
     --no-pager            Do not pipe output into a pager
     --no-ask-password     Do not prompt for password
  -H --host=[USER@]HOST    Operate on remote host
  -M --machine=CONTAINER   Operate on local container
     --adjust-system-clock Adjust system clock when changing local RTC mode
     --monitor             Monitor status of systemd-timesyncd
  -p --property=NAME       Show only properties by this name
  -a --all                 Show all properties, including empty ones
     --value               When showing properties, only print the value
Commands:
  status                   Show current time settings
  show                     Show properties of systemd-timedated
  set-time TIME            Set system time
  set-timezone ZONE        Set system time zone
  list-timezones           Show known time zones
  set-local-rtc BOOL       Control whether RTC is in local time
  set-ntp BOOL             Enable or disable network time synchronization
systemd-timesyncd Commands:
  timesync-status          Show status of systemd-timesyncd
  show-timesync            Show properties of systemd-timesyncd

list-timezones 列出系统上支持的时区

set-timezone 设定时区

set-time 设置时间

set-btp 设置同步ntp


时钟同步

用硬件时钟同步系统时钟:

hwclock --hctosys 或者 clock --hctosys

hc代表硬件时间,sys代表系统时间,即用硬件时钟同步系统时钟


用系统时钟同步硬件时钟:

hwclock --systohc或者clock --systohc

即用系统时钟同步硬件时钟


同步网络时间

同步互联网时间

ntpdate -u cn.pool.ntp.org


hwclock命令

Linux hwclock命令用于显示与设定硬件时钟。

在Linux中有硬件时钟与系统时钟等两种时钟。

硬件时钟是指主机板上的时钟设备,也就是通常可在BIOS画面设定的时钟。

系统时钟则是指kernel中的时钟。

当Linux启动时,系统时钟会去读取硬件时钟的设定,之后系统时钟即独立运作。所有Linux相关指令与函数都是读取系统时钟的设定。


语法

hwclock [--adjust][--debug][--directisa][--hctosys][--show][--systohc][--test]
[--utc][--version][--set --date=<日期与时间>]


参数

  • --adjust  hwclock每次更改硬件时钟时,都会记录在/etc/adjtime文件中。使用--adjust参数,可使hwclock根据先前的记录来估算硬件时钟的偏差,并用来校正目前的硬件时钟。
  • --debug  显示hwclock执行时详细的信息。
  • --directisa  hwclock预设从/dev/rtc设备来存取硬件时钟。若无法存取时,可用此参数直接以I/O指令来存取硬件时钟。
  • --hctosys  将系统时钟调整为与目前的硬件时钟一致。
  • --set --date=<日期与时间>  设定硬件时钟。
  • --show  显示硬件时钟的时间与日期。
  • --systohc  将硬件时钟调整为与目前的系统时钟一致。
  • --test  仅测试程序,而不会实际更改硬件时钟。
  • --utc  若要使用格林威治时间,请加入此参数,hwclock会执行转换的工作。
  • --version  显示版本信息。


查看和修改Linux的时间

1. 查看时间和日期

命令 : "date"

2.设置时间和日期

例如:将系统日期设定成2009年11月3日的命令

命令 : "date -s 11/03/2009"

将系统时间设定成下午5点55分55秒的命令

命令 : "date -s 17:55:55"

3. 将当前时间和日期写入BIOS,避免重启后失效

命令 : "hwclock -w"


时钟--详解

硬件时钟

硬件时钟,又称实时时钟(Real Time Clock,RTC)或CMOS时钟,是独立的硬件设备(电池、电容元件等),保存的时间包括年、月、日、时、分、秒。2016年之后的UEFI固件还能保存时区和是否使用夏令时。

操作硬件时钟的工具是hwclock,用于查询、设置硬件时钟等。

读取硬件时钟:

hwclock --show

使用系统时钟设置硬件时钟:

hwclock --systohc

更新硬件时钟后,/etc/adjtime随之更新。


系统时钟

系统时钟,又称软件时钟,是Linux内核的一部分,包括时间、时区、夏令时(如果适用)。

系统启动时,系统时钟的初始值根据硬件时钟设定(依赖于/etc/adjtime);

系统启动后,Linux内核利用定时器中断维护系统时钟 ,与硬件时钟无关。

操作系统时钟的工具是timedatectl,用于查询/设置时间、设置时区、设置时间同步等。

查询时钟,其中包括本地时间、UTC时间、RTC时间、时区、系统时钟同步状态、NTP服务状态、RTC是否使用本地时间:

# timedatectl
               Local time: Tue 2020-06-02 18:08:06 CST
           Universal time: Tue 2020-06-02 10:08:06 UTC
                 RTC time: Tue 2020-06-02 10:08:06    
                Time zone: Asia/Shanghai (CST, +0800) 
System clock synchronized: yes                        
              NTP service: active                     
          RTC in local TZ: no 

设置时钟,时间格式是yyyy-MM-dd hh:mm:ss

# timedatectl set-time "2020-06-02 17:30:00"
# timedatectl
               Local time: Tue 2020-06-02 17:30:05 CST
           Universal time: Tue 2020-06-02 09:30:05 UTC
                 RTC time: Tue 2020-06-02 09:30:05    
                Time zone: Asia/Shanghai (CST, +0800) 
System clock synchronized: no                         
              NTP service: inactive                   
          RTC in local TZ: no  

时间字符串为本地时间,执行命令后,本地时间、UTC时间、RTC时间会同时更新。

开启时间同步:

timedatectl set-ntp 1


时间同步

可以使用ntpd -qg命令同步时间。

另外,Linux系统自带ntpd.service,可以使用systemctl start ntpd命令启动NTP服务。

需要注意的是,ntpd命令或服务仅更新本地时间和UTC时间,不更新RTC时间。 可以设置一个过去的时间,然后执行ntpd命令校准时间,再执行timedatectl命令查询验证。

不过这并不是什么大问题,因为关机时操作系统会根据系统时钟重设硬件时钟,下次启动时,二者恢复一致。


时间标准

两种时间标准:

  • 本地时间(时区相关)
  • UTC时间(时区无关)

硬件时钟所采用的时间标准是由操作系统决定的,默认情况下,Windows使用本地时间,macOS使用UTC时间,类Unix系统则各有不同。

使用UTC时间标准的操作系统通常把硬件时钟视为UTC,然后在启动时根据时区进行调整设置系统时间。

如果一台机器上安装了多个操作系统,它们都使用硬件时钟设置系统时间,建议采用统一的UTC时间标准,避免切换系统时发生时间错乱。


网络时间

ntpdate命令用于同步更新互联网时间,或者NTP服务器时间

NTP服务器【Network Time Protocol(NTP)】是用来使计算机时间同步化的一种协议,它可以使计算机对其服务器或时钟源(如石英钟,GPS等等)做同步化,它可以提供高精准度的时间..


ntp时钟同步服务

centos7以上版本对如下命令已经不能用:

yum install ntp
# 报如下错,
Error: Unable to find a match
# 使用如下方法 安装ntp服务
# 添加源
rpm -ivh http://mirrors.wlnmp.com/centos/wlnmp-release-centos.noarch.rpm
# 安装ntp服务
dnf  install wntp
# 时间同步
ntpdate ntp1.aliyun.com


chrony时钟同步服务

适用于centos7以上版本

chrony是网络时间协议(NTP)的通用实现。它可以将系统时钟与NTP服务器,参考时钟(例如GPS接收器)以及使用手表和键盘进行的手动输入进行同步。它还可以充当NTPv4(RFC 5905)服务器并与之同行,以向网络中的其他计算机提供时间服务。

它被设计为在各种条件下均能良好运行,包括间歇性网络连接,网络严重拥塞,温度变化(普通计算机时钟对温度敏感)以及无法连续运行或在虚拟机上运行的系统。

通过Internet同步的两台计算机之间的典型精度在几毫秒内;在LAN上,精度通常为数十微秒。使用硬件时间戳记或硬件参考时钟,亚微秒精度是可能的。

chrony包括两个程序,

  • chronyd一个是守护程序,可以在引导时启动,
  • chronyc另一个是命令行界面程序,可以用来监视其chronyd性能并在运行时更改各种操作参数。

目前centos7已经默认安装chrony3.2作为时钟服务。


安装chronyd服务

# 操作主机:所有主机
yum -y install chrony
#   备份旧配置文件
cp /etc/chrony.conf /etc/chrony.$(date +'%s')

配置chronyd服务器

# 操作主机:chronyd服务器 
#  修改服务器配置⽂件,以阿⾥云时间服务器为上游服务器
cat > /etc/chrony.conf <<_EOF
server ntp1.aliyun.com iburst
server ntp2.aliyun.com iburst
driftfile /var/lib/chrony/drift
makestep 1.0 3
rtcsync
local stratum 10
logdir /var/log/chrony
_EOF

启动chrony服务

# 3. 启动chronyd
systemctl start chronyd
systemctl enable chronyd
# 查看时间同步状态
timedatectl status
# 开启网络时间同步
timedatectl set-ntp true


检查阿里云时钟服务状态

1. [root@localhost bigunion]# chronyc sources
2. 210 Number of sources = 2
3. MS Name/IP address         Stratum Poll Reach LastRx Last sample               
4. ===============================================================================
5. ^* 120.25.115.20                 2  10   367   410  +2787us[+3511us] +/-   18ms
6. ^+ 203.107.6.88                  2  10   377   438   -547us[ +176us] +/-   23ms


查看123和323端口是否监听

chrony配置参数说明

服务unit文件: /usr/lib/systemd/system/chronyd.service

监听端口: 323/udp,123/udp

配置文件: /etc/chrony.conf

  • server: 该参数可以多次用于添加时钟服务器,必须以"server "格式使用。可以添加任意个时间服务器。
  • stratumweight: stratumweight指令设置当chronyd从可用源中选择同步源时,每个层应该添加多少距离到同步距离。
  • 默认情况下,CentOS中设置为0,让chronyd在选择源时忽略源的层级。
  • driftfile: 根据实际时间计算出计算机增减时间的比率,将它记录到一个文件中是最合理的,
  • 在重启后为系统时钟作出补偿,甚至可能的话,会从时钟服务器获得较好的估值。
  • rtcsync: rtcsync指令将启用一个内核模式,在该模式中,系统时间每11分钟会拷贝到实时时钟(RTC)。
  • allow/deny: 这里你可以指定一台主机、子网,或者网络以允许或拒绝NTP连接到扮演时钟服务器的机器。
  • 例:
  • allow 192.168.0.10
  • deny 192.168.2.10
  • cmdallow/cmddeny: 指定哪个IP地址或哪台主机可以通过chronyd使用控制命令。
  • bindcmdaddress : 该指令允许你限制chronyd监听哪个网络接口的命令包(由chronyc执行)。
  • 该指令通过cmddeny机制提供了一个除上述限制以外可用的额外的访问控制等级。
  • 例:
  • bindcmdaddress 127.0.0.1
  • bindcmdaddress ::1
  • makestep: chronyd将根据需求通过减慢或加速时钟,使得系统逐步纠正所有时间偏差。在某些特定情况下,系统时钟可能会漂移过快,导致该调整过程消耗很长的时间来纠正系统时钟。该指令强制chronyd在调整期大于某个阀值时步进调整系统时钟,但只有在因为chronyd启动时间超过指定限制(可使用负值来禁用限制),没有更多时钟更新时才生效。
  • makestep 1.0 3 如果系统时钟的偏移量大于1秒,则允许系统时钟在前三次更新中步进。

常见参数如上,实际参数还有很多,可以在官网查看。

https://chrony.tuxfamily.org/documentation.html 


chrony 命令小册子

查看 ntp_servers

chronyc sources -v

查看 ntp_servers 状态

chronyc sourcestats -v

查看 ntp_servers 是否在线

chronyc activity -v

查看 ntp 详细信息

chronyc tracking -v

强制同步下系统时钟

chronyc -a makestep
[root@localhost etc]# chronyc --help
Usage: chronyc [-h HOST] [-p PORT] [-n] [-c] [-d] [-4|-6] [-m] [COMMAND]
[root@localhost etc]# chronyc help
System clock:               
tracking                    Display system time information
makestep                    Correct clock by stepping immediately
makestep <threshold> <updates>
                            Configure automatic clock stepping
maxupdateskew <skew>        Modify maximum valid skew to update frequency
waitsync [<max-tries> [<max-correction> [<max-skew> [<interval>]]]]
                            Wait until synchronised in specified limits
Time sources:               
sources [-v]                Display information about current sources
sourcestats [-v]            Display statistics about collected measurements
reselect                    Force reselecting synchronisation source
reselectdist <dist>         Modify reselection distance
NTP sources:                
activity                    Check how many NTP sources are online/offline
ntpdata [<address>]         Display information about last valid measurement
add server <address> [options]
                            Add new NTP server
add peer <address> [options]
                            Add new NTP peer
delete <address>            Remove server or peer
burst <n-good>/<n-max> [<mask>/<address>]
                            Start rapid set of measurements
maxdelay <address> <delay>  Modify maximum valid sample delay
maxdelayratio <address> <ratio>
                            Modify maximum valid delay/minimum ratio
maxdelaydevratio <address> <ratio>
                            Modify maximum valid delay/deviation ratio
minpoll <address> <poll>    Modify minimum polling interval
maxpoll <address> <poll>    Modify maximum polling interval
minstratum <address> <stratum>
                            Modify minimum stratum
offline [<mask>/<address>]  Set sources in subnet to offline status
online [<mask>/<address>]   Set sources in subnet to online status
onoffline                   Set all sources to online or offline status
                            according to network configuration
polltarget <address> <target>
                            Modify poll target
refresh                     Refresh IP addresses
Manual time input:          
manual off|on|reset         Disable/enable/reset settime command
manual list                 Show previous settime entries
manual delete <index>       Delete previous settime entry
settime <time>              Set daemon time
                            (e.g. Sep 25, 2015 16:30:05 or 16:30:05)
NTP access:                 
accheck <address>           Check whether address is allowed
clients                     Report on clients that have accessed the server
serverstats                 Display statistics of the server
allow [<subnet>]            Allow access to subnet as a default
allow all [<subnet>]        Allow access to subnet and all children
deny [<subnet>]             Deny access to subnet as a default
deny all [<subnet>]         Deny access to subnet and all children
local [options]             Serve time even when not synchronised
local off                   Don't serve time when not synchronised
smoothtime reset|activate   Reset/activate time smoothing
smoothing                   Display current time smoothing state
Monitoring access:          
cmdaccheck <address>        Check whether address is allowed
cmdallow [<subnet>]         Allow access to subnet as a default
cmdallow all [<subnet>]     Allow access to subnet and all children
cmddeny [<subnet>]          Deny access to subnet as a default
cmddeny all [<subnet>]      Deny access to subnet and all children
Real-time clock:            
rtcdata                     Print current RTC performance parameters
trimrtc                     Correct RTC relative to system clock
writertc                    Save RTC performance parameters to file
Other daemon commands:      
cyclelogs                   Close and re-open log files
dump                        Dump all measurements to save files
rekey                       Re-read keys from key file
shutdown                    Stop daemon
Client commands:            
dns -n|+n                   Disable/enable resolving IP addresses to hostnames
dns -4|-6|-46               Resolve hostnames only to IPv4/IPv6/both addresses
timeout <milliseconds>      Set initial response timeout
retries <retries>           Set maximum number of retries
keygen [<id> [<type> [<bits>]]]
                            Generate key for key file
exit|quit                   Leave the program
help                        Generate this help


chronyc sources 输出结果解析

[root@localhost etc]# chronyc 
chrony version 3.5
Copyright (C) 1997-2003, 2007, 2009-2019 Richard P. Curnow and others
chrony comes with ABSOLUTELY NO WARRANTY.  This is free software, and
you are welcome to redistribute it under certain conditions.  See the
GNU General Public License version 2 for details.
chronyc> sources -v
210 Number of sources = 2
  .-- Source mode  '^' = server, '=' = peer, '#' = local clock.
 / .- Source state '*' = current synced, '+' = combined , '-' = not combined,
| /   '?' = unreachable, 'x' = time may be in error, '~' = time too variable.
||                                                 .- xxxx [ yyyy ] +/- zzzz
||      Reachability register (octal) -.           |  xxxx = adjusted offset,
||      Log2(Polling interval) --.      |          |  yyyy = measured offset,
||                                \     |          |  zzzz = estimated error.
||                                 |    |           \
MS Name/IP address         Stratum Poll Reach LastRx Last sample               
===============================================================================
^* 120.25.115.20                 2   6   377    25  -1078us[-1292us] +/-   19ms
^- 203.107.6.88                  2   6   377    25  -5231us[-5445us] +/-   23ms
chronyc> exit
exit

M

 这表示信号源的模式。^表示服务器,=表示对等方,表示本地连接的参考时钟。

S

 此列指示源的状态。

* 表示chronyd当前同步到的源。
+ 表示可接受的信号源,与选定的信号源组合在一起。
- 表示被合并算法排除的可接受源。
? 指示已失去连接性或其数据包未通过所有测试的源。它也显示在启动时,直到从中至少收集了3个样本为止。
x 表示chronyd认为是虚假行情的时钟(即,其时间与大多数其他来源不一致)。
〜 表示时间似乎具有太多可变性的来源。

Name/IP address

这显示了源的名称或IP地址,或参考时钟的参考ID。

Stratum

这显示了来源的层,如其最近收到的样本中所报告的那样。层1表示一台具有本地连接的参考时钟的计算机。与第1层计算机同步的计算机位于第2层。与第2层计算机同步的计算机位于第3层,依此类推。

Poll

这显示轮询源的速率,以秒为单位的时间间隔的以2为底的对数。因此,值为6表示每64秒进行一次测量。chronyd会根据当前情况自动更改轮询速率。

Reach

这显示了源的可达性寄存器以八进制数字打印。寄存器有8位,并在每个从源接收或丢失的数据包上更新。值377表示从最后八次传输中收到了对所有用户的有效答复。

LastRx

此列显示多长时间前从来源接收到了最后一个好的样本(在下一列中显示)。未通过某些测试的测量将被忽略。通常以秒为单位。字母mhdy表示分钟,小时,天或年。

Last sample

此列显示上次测量时本地时钟与源之间的偏移。方括号中的数字表示实际测得的偏移量。可以用ns(表示纳秒),us (表示微秒),ms(表示毫秒)或s(表示秒)作为后缀。方括号左侧的数字表示原始测量值,已调整为允许此后施加于本地时钟的任何摆度。

+/-指示器后面的数字表示测量中的误差范围。正偏移表示本地时钟位于源时钟之前。


备注

ntp常用服务器

国内:

cn.pool.ntp.org  中国开源免费NTP服务器
ntp.aliyun.com  阿里云
ntp1.aliyun.com 阿里云NTP服务器
ntp2.aliyun.com 阿里云NTP服务器
time1.aliyun.com 阿里云NTP服务器
time2.aliyun.com 阿里云NTP服务器
210.72.145.44 国家授时中心
s1a.time.edu.cn 北京邮电大学
s1b.time.edu.cn 清华大学
s1c.time.edu.cn 北京大学
s1d.time.edu.cn 东南大学
s1e.time.edu.cn 清华大学
s2a.time.edu.cn 清华大学
s2b.time.edu.cn 清华大学
s2c.time.edu.cn 北京邮电大学
s2d.time.edu.cn 西南地区网络中心
s2e.time.edu.cn 西北地区网络中心
s2f.time.edu.cn 东北地区网络中心
s2g.time.edu.cn 华东南地区网络中心
s2h.time.edu.cn 四川大学网络管理中心
s2j.time.edu.cn 大连理工大学网络中心
s2k.time.edu.cn CERNET桂林主节点
s2m.time.edu.cn 北京大学
ntp.sjtu.edu.cn 202.120.2.101 上海交通大学

国外

time1.apple.com 苹果NTP服务器
time2.apple.com 苹果NTP服务器
time3.apple.com 苹果NTP服务器
time4.apple.com 苹果NTP服务器
time5.apple.com 苹果NTP服务器
time1.google.com 谷歌NTP服务器
time2.google.com 谷歌NTP服务器
time3.google.com 谷歌NTP服务器
time4.google.com 谷歌NTP服务器
pool.ntp.org 开源免费NTP服务器


参考文档



目录
打赏
0
1
0
0
3331
分享
相关文章
|
11天前
|
Linux系统之whereis命令的基本使用
Linux系统之whereis命令的基本使用
51 23
Linux系统之whereis命令的基本使用
|
2月前
|
Linux缓存管理:如何安全地清理系统缓存
在Linux系统中,内存管理至关重要。本文详细介绍了如何安全地清理系统缓存,特别是通过使用`/proc/sys/vm/drop_caches`接口。内容包括清理缓存的原因、步骤、注意事项和最佳实践,帮助你在必要时优化系统性能。
244 78
Linux系统查看操作系统版本信息、CPU信息、模块信息
在Linux系统中,常用命令可帮助用户查看操作系统版本、CPU信息和模块信息
117 23
嵌入式Linux系统编程 — 5.3 times、clock函数获取进程时间
在嵌入式Linux系统编程中,`times`和 `clock`函数是获取进程时间的两个重要工具。`times`函数提供了更详细的进程和子进程时间信息,而 `clock`函数则提供了更简单的处理器时间获取方法。根据具体需求选择合适的函数,可以更有效地进行性能分析和资源管理。通过本文的介绍,希望能帮助您更好地理解和使用这两个函数,提高嵌入式系统编程的效率和效果。
123 13
|
2月前
|
Win10系统上直接使用linux子系统教程(仅需五步!超简单,快速上手)
本文介绍了如何在Windows 10上安装并使用Linux子系统。首先,通过应用商店安装Windows Terminal和Linux系统(如Ubuntu)。接着,在控制面板中启用“适用于Linux的Windows子系统”并重启电脑。最后,在Windows Terminal中选择安装的Linux系统即可开始使用。文中还提供了注意事项和进一步配置的链接。
69 0
网络安全与信息安全:知识分享####
【10月更文挑战第21天】 随着数字化时代的快速发展,网络安全和信息安全已成为个人和企业不可忽视的关键问题。本文将探讨网络安全漏洞、加密技术以及安全意识的重要性,并提供一些实用的建议,帮助读者提高自身的网络安全防护能力。 ####
86 17
网络安全与信息安全:关于网络安全漏洞、加密技术、安全意识等方面的知识分享
随着互联网的普及,网络安全问题日益突出。本文将介绍网络安全的重要性,分析常见的网络安全漏洞及其危害,探讨加密技术在保障网络安全中的作用,并强调提高安全意识的必要性。通过本文的学习,读者将了解网络安全的基本概念和应对策略,提升个人和组织的网络安全防护能力。
网络安全与信息安全:关于网络安全漏洞、加密技术、安全意识等方面的知识分享
随着互联网的普及,网络安全问题日益突出。本文将从网络安全漏洞、加密技术和安全意识三个方面进行探讨,旨在提高读者对网络安全的认识和防范能力。通过分析常见的网络安全漏洞,介绍加密技术的基本原理和应用,以及强调安全意识的重要性,帮助读者更好地保护自己的网络信息安全。
64 10
网络安全与信息安全:关于网络安全漏洞、加密技术、安全意识等方面的知识分享
在数字化时代,网络安全和信息安全已成为我们生活中不可或缺的一部分。本文将介绍网络安全漏洞、加密技术和安全意识等方面的内容,并提供一些实用的代码示例。通过阅读本文,您将了解到如何保护自己的网络安全,以及如何提高自己的信息安全意识。
73 10
云计算与网络安全:云服务、网络安全、信息安全等技术领域的融合与挑战
本文将探讨云计算与网络安全之间的关系,以及它们在云服务、网络安全和信息安全等技术领域中的融合与挑战。我们将分析云计算的优势和风险,以及如何通过网络安全措施来保护数据和应用程序。我们还将讨论如何确保云服务的可用性和可靠性,以及如何处理网络攻击和数据泄露等问题。最后,我们将提供一些关于如何在云计算环境中实现网络安全的建议和最佳实践。

热门文章

最新文章