【Linux】RHCE备考复习系统管理startx、uname命令

startx命令

startx命令来自于英文词组”start X-windows“的缩写,其功能是用于启动X-Windows系统。X-Windows System也被称为X或X11,中文译为X窗口系统,主要工作就是以图形方式显示软件窗口的系统,现在的GNOME和KDE桌面环境都是以X窗口系统为基础构建成的。

语法格式:startx [参数]
参数功能
-m当未找到启动脚本时,启动窗口管理器
-r当未找到启动脚本时,装入资源文件
-w强制启动
-x使用startup脚本启动X-windows会话

实例

以默认方式初始化启动X窗口系统

[root@monster ~]# startx
xauth:  file /root/.serverauth.21712 does not exist

X.Org X Server 1.20.3
X Protocol Version 11, Revision 0
Build Operating System:  4.14.0-49.el7a.noaead.x86_64 
Current Operating System: Linux monster.com 4.18.0-80.el8.x86_64 #1 SMP Wed Mar 13 12:02:46 UTC 2019 x86_64
Kernel command line: BOOT_IMAGE=(hd0,gpt2)/vmlinuz-4.18.0-80.el8.x86_64 root=/dev/mapper/rhel-root ro resume=/dev/mapper/rhel-swap rd.lvm.lv=rhel/root rd.lvm.lv=rhel/swap rhgb quiet
Build Date: 22 February 2019  07:47:26PM
Build ID: xorg-x11-server 1.20.3-5.el8 
Current version of pixman: 0.36.0
	Before reporting problems, check http://wiki.x.org
	to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
	(++) from command line, (!!) notice, (II) informational,
	(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.2.log", Time: Sat May 14 04:48:44 2022
(==) Using config directory: "/etc/X11/xorg.conf.d"
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
VMware: No 3D enabled (0, Success).
(II) modeset(0): Initializing kms color map for depth 24, 8 bpc.

强制启动X窗口系统

[root@monster ~]# startx -w
xauth:  file /root/.serverauth.22325 does not exist


X.Org X Server 1.20.3
X Protocol Version 11, Revision 0
Build Operating System:  4.14.0-49.el7a.noaead.x86_64 
Current Operating System: Linux monster.com 4.18.0-80.el8.x86_64 #1 SMP Wed Mar 13 12:02:46 UTC 2019 x86_64
Kernel command line: BOOT_IMAGE=(hd0,gpt2)/vmlinuz-4.18.0-80.el8.x86_64 root=/dev/mapper/rhel-root ro resume=/dev/mapper/rhel-swap rd.lvm.lv=rhel/root rd.lvm.lv=rhel/swap rhgb quiet
Build Date: 22 February 2019  07:47:26PM
Build ID: xorg-x11-server 1.20.3-5.el8 
Current version of pixman: 0.36.0
	Before reporting problems, check http://wiki.x.org
	to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
	(++) from command line, (!!) notice, (II) informational,
	(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.2.log", Time: Sat May 14 04:54:16 2022
(==) Using config directory: "/etc/X11/xorg.conf.d"
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
VMware: No 3D enabled (0, Success).
(II) modeset(0): Initializing kms color map for depth 24, 8 bpc.
xinit: Unable to run program "xterm": No such file or directory
Specify a program on the command line or make sure that /usr/bin
is in your path.

xinit: connection to X server lost

waiting for X server to shut down (II) Server terminated successfully (0). Closing log file.

[root@monster ~]# 

uname命令

uname命令来自于英文词组”Unix name“的缩写,其功能是用于查看系统主机名、内核及硬件架构等信息。如果不加任何参数,默认仅显示系统内核名称,相当于-s参数。

语法格式:uname [参数]
参数功能
-a显示系统所有相关信息
-m显示计算机硬件架构
-n显示主机名称
-r显示内核发行版本号
-s显示内核名称
-v显示内核版本
-p显示主机处理器类型
-o显示操作系统名称
-i显示硬件平台

实例

显示系统内核名称

[root@monster ~]# uname
Linux
[root@monster ~]# 

显示系统所有相关信息

[root@monster ~]# uname -a
Linux monster.com 4.18.0-80.el8.x86_64 #1 SMP Wed Mar 13 12:02:46 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
[root@monster ~]# 

显示系统内核版本号

[root@monster ~]# uname -r
4.18.0-80.el8.x86_64
[root@monster ~]# 

系统硬件架构

[root@monster ~]# uname -i
x86_64
[root@monster ~]# 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

打赏作者

勤奋的树懒

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

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

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

打赏作者

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

抵扣说明:

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

余额充值