Deepin基本环境查看(一)【基本信息】

Deepin操作系统中,有方便酷炫的图形环境能查看系统的环境,同样也有命令行方式来查看系统的基本环境,本文介绍如何查看机器名、操作系统版本和内核版本、基本硬件信息、基本软件环境等信息并给出示例
​ 本文包括的shell命令有unamehostnamedmidecodegetconflsb_releaselsusblspcilsmodenv等,还有部分文本处理命令catgrephead

  • 查看机器名、内核版本、硬件架构、是否为虚拟机信息
uname -a # 查看内核、机器名、操作系统、CPU信息
# 执行结果
Linux worker-PC 5.15.45-amd64-desktop #1 SMP Tue Jun 7 21:44:04 CST 2022 x86_64 GNU/Linux

hostname # 查看机器名
# 执行结果
worker-PC

dmidecode | grep Product  # 查看计算机型号、是否为物理机
# 执行结果
        Product Name: VMware Virtual Platform
        Product Name: 440BX Desktop Reference Platform
  • 查看操作系统版本信息
head -n 1 /etc/issue # 查看操作系统版本
# 执行结果
Deepin GNU/Linux 20.7.1 \n \l

cat /etc/os-release # 查看操作系统产品版本信息
# 执行结果
PRETTY_NAME="Deepin 20.7.1"
NAME="Deepin"
VERSION_ID="20.7.1"
......

lsb_release -a # 查看炒作系统版本代号
# 执行结果
No LSB modules are available.
Distributor ID: Deepin
Description:    Deepin 20.7.1
......
  • 查看操作系统内核、编译器、debian版本 (Deepin基于debian)
cat /proc/version # 查看操作系统内核、编译器版本
# 执行结果
Linux version 5.15.45-amd64-desktop (deepin@wh-k8snode-70) (gcc (Uos 8.3.0.6-1+dde) 8.3.0, GNU ld (GNU Binutils for Uos) 2.31.1) #1 SMP Tue Jun 7 21:44:04 CST 2022

cat /etc/debian_version # 查看debian爸爸嫩
# 执行结果
10.10
  • 查看cpu信息
cat /proc/cpuinfo | grep name | cut -f2 -d:  | uniq  # cpu信息
# 执行结果
AMD Ryzen 7 4800H with Radeon Graphics

# 虚拟机2核4线程
cat /proc/cpuinfo | grep physical | sort -n | uniq -c # cpu核数
# 执行结果
      4 address sizes   : 43 bits physical, 48 bits virtual
      2 physical id     : 0
      2 physical id     : 1
grep "physical id" /proc/cpuinfo|sort|uniq|wc -l # cpu个数
# 执行结果
2
getconf LONG_BIT # CPU位数
# 执行结果
64
  • 查看硬件设备
lsusb -tv # 列出USB设备
# 执行结果(举例)
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M
    |__ Port 1: Dev 2, If 0, Class=Human Interface Device, Driver=usbhid, 12M
    |__ Port 2: Dev 3, If 0, Class=Hub, Driver=hub/7p, 12M
......

lspci -tv # 列出PCI设备
# 执行结果(举例)
-[0000:00]-+-00.0  Intel Corporation 440BX/ZX/DX - 82443BX/ZX/DX Host bridge
           +-01.0-[01]--
           +-07.0  Intel Corporation 82371AB/EB/MB PIIX4 ISA
......
  • 查看系统环境
lsmod # 列出已加载的内核模块
# 执行结果
Module                  Size  Used by
nfnetlink_queue        24576  0
nfnetlink_log          20480  0
......

env # 查看环境变量
SHELL=/bin/bash
WINDOWID=0
COLORTERM=truecolor
......

下一篇:Deepin基本环境查看(二)内存

一日练,一日功,一日不练十日空

may the odds be ever in your favor ~

相关推荐

  1. Deepin基本环境查看)【基本信息

    2024-01-24 11:34:01       59 阅读
  2. Linux基本指令查询硬件信息001

    2024-01-24 11:34:01       32 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-01-24 11:34:01       94 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-01-24 11:34:01       100 阅读
  3. 在Django里面运行非项目文件

    2024-01-24 11:34:01       82 阅读
  4. Python语言-面向对象

    2024-01-24 11:34:01       91 阅读

热门阅读

  1. 百度搜索智能精选是什么东西、怎么加入?

    2024-01-24 11:34:01       52 阅读
  2. 美易官方:小米汽车交付时间传闻被官方辟谣

    2024-01-24 11:34:01       51 阅读
  3. CSS高级技巧导读

    2024-01-24 11:34:01       55 阅读
  4. react craco配置响应式postcss-px-to-viewport

    2024-01-24 11:34:01       52 阅读
  5. 【Apache PLC4X】工业物联网的通用协议适配器

    2024-01-24 11:34:01       62 阅读
  6. cad二次开发autolisp---目录

    2024-01-24 11:34:01       66 阅读
  7. 如何通过数字孪生技术构建智慧城市

    2024-01-24 11:34:01       50 阅读