?设置窗口上显示最大化和最小化按钮
安装完Rocky Linux 8.5后,窗口上没有没有最大化和最小化按钮,如下图所示:
?解决办法:
安装gnome-tweaks软件包,并且启动这个软件进行设置:
1、安装gnome-tweaks软件包:
[root@localhost blctrl]# dnf install gnome-tweaks
Last metadata expiration check: 2:02:15 ago on Fri 24 Jun 2022 08:44:01 AM CST.
Dependencies resolved.
=========================================================================================================================================================================================
Package Architecture Version Repository Size
=========================================================================================================================================================================================
Installing:
gnome-tweaks noarch 3.28.1-7.el8 appstream 330 k
Installing dependencies:
gnome-shell-extension-user-theme noarch 3.32.1-27.el8 appstream 27 k
Transaction Summary
=========================================================================================================================================================================================
Install 2 Packages
Total download size: 357 k
Installed size: 1.4 M
Is this ok [y/N]: y
Downloading Packages:
(1/2): gnome-shell-extension-user-theme-3.32.1-27.el8.noarch.rpm 168 kB/s | 27 kB 00:00
(2/2): gnome-tweaks-3.28.1-7.el8.noarch.rpm 928 kB/s | 330 kB 00:00
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total 178 kB/s | 357 kB 00:02
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Installing : gnome-shell-extension-user-theme-3.32.1-27.el8.noarch 1/2
Installing : gnome-tweaks-3.28.1-7.el8.noarch 2/2
Running scriptlet: gnome-tweaks-3.28.1-7.el8.noarch 2/2
Verifying : gnome-shell-extension-user-theme-3.32.1-27.el8.noarch 1/2
Verifying : gnome-tweaks-3.28.1-7.el8.noarch 2/2
Installed:
gnome-shell-extension-user-theme-3.32.1-27.el8.noarch gnome-tweaks-3.28.1-7.el8.noarch
Complete!
[root@localhost blctrl]#
2、启动刚才在命令行中刚才安装的软件:
[root@localhost blctrl]# gnome-tweaks
3、在启动的设置窗口中,选择windows项,并且设置Maximize和Minimize为ON:
?
4、在打开一个终端,窗口上最大化和最小化按钮出现了:
?
设置启动时默认进入图形用户界面:
在root用户权限下:
查看当前启动模式
systemctl get-default
[blctrl@localhost ~]$ systemctl get-default
graphical.target
更改模式命令:
由命令行模式更改为图形界面模式:systemctl set-default graphical.target
由图形界面模式更改为命令行模式:systemctl set-default multi-user.target
跟以前使用的linux版本一样,编辑 vi /etc/inittab 文件,修改系统初始化方式
[blctrl@localhost ~]$ cat /etc/inittab
# inittab is no longer used.
#
# ADDING CONFIGURATION HERE WILL HAVE NO EFFECT ON YOUR SYSTEM.
#
# Ctrl-Alt-Delete is handled by /usr/lib/systemd/system/ctrl-alt-del.target
#
# systemd uses 'targets' instead of runlevels. By default, there are two main targets:
#
# multi-user.target: analogous to runlevel 3
# graphical.target: analogous to runlevel 5
#
# To view current default target, run:
# systemctl get-default
#
# To set a default target, run:
# systemctl set-default TARGET.target
查看以及修改主机名
[root@localhost blctrl]# cat /etc/hostname # 查看主机名
localhost.localdomain
[root@localhost blctrl]# hostnamectl set-hostname areadetector # 修改主机名
[root@localhost blctrl]# hostnamectl # 查看修改之后的主机名
Static hostname: areadetector
Icon name: computer-desktop
Chassis: desktop
Machine ID: 8441fa311fda46f9b78427fa61317010
Boot ID: 73263affd07c4f9f92b878f355c54468
Operating System: Rocky Linux 8.6 (Green Obsidian)
CPE OS Name: cpe:/o:rocky:rocky:8:GA
Kernel: Linux 4.18.0-372.9.1.el8.x86_64
Architecture: x86-64
[root@localhost blctrl]# cat /etc/hostname # 查看修改之后的主机名
areadetector
|