获取系统版本

 要获取系统版本,可以使用以下方法之一:

请注意,不同的操作系统可能有不同的方法来获取系统版本。上述方法适用于常见的操作系统,但可能不适用于所有情况。

  1. 在Windows上,可以按下Win + R键,然后输入"winver"并按下Enter键。这将打开一个窗口,显示当前安装的Windows版本。

  2. 在Mac上,可以点击左上角的苹果图标,然后选择"关于本机"。在弹出的窗口中,可以看到当前的MacOS版本。

  3. 在Linux上,可以打开终端,并输入以下命令之一:

    • lsb_release -a:显示Linux发行版的详细信息,包括版本号。

    • cat /etc/os-release:显示操作系统的版本信息。

一下centos示例:

[root@VM-0-17-tencentos software]# lsb_release -a
bash: lsb_release: command not found...
Install package 'redhat-lsb-core' to provide command 'lsb_release'? [N/y] y


 * Waiting in queue... 
 * Loading list of packages.... 
The following packages have to be installed:
 cups-client-1:2.2.6-50.tl3.x86_64	CUPS printing system - client programs
 ncurses-compat-libs-6.1-9.20180224.tl3.x86_64	Ncurses compatibility libraries
 redhat-lsb-core-4.1-47.tl3.x86_64	LSB Core module support
 redhat-lsb-submod-security-4.1-47.tl3.x86_64	LSB Security submodule support
 spax-1.5.3-13.tl3.x86_64	Portable archive exchange
 util-linux-user-2.32.1-42.tl3.x86_64	libuser based util-linux utilities
Proceed with changes? [N/y] y


 * Waiting in queue... 
 * Waiting for authentication... 
 * Waiting in queue... 
 * Downloading packages... 
 * Requesting data... 
 * Testing changes... 
 * Installing packages... 
LSB Version:	:core-4.1-amd64:core-4.1-noarch
Distributor ID:	CentOS
Description:	CentOS Linux release 8.6.2205 (Core) 
Release:	8.6.2205
Codename:	Core

[root@VM-0-17-tencentos software]# lsb_release -a
LSB Version:	:core-4.1-amd64:core-4.1-noarch
Distributor ID:	CentOS
Description:	CentOS Linux release 8.6.2205 (Core) 
Release:	8.6.2205
Codename:	Core
[root@VM-0-17-tencentos software]# 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

杰哥技术分享

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值