帮助中心

这里有最新的使用文档和教程

< 返回

取消now cockpit.socket提示

2023-06-15 15:22 作者:31IDC 阅读量:1105 所属分类:物理服务器

如何取消Centos 8中的Activate the web console with: systemctl enable –now cockpit.socket提示

每次进入Centos 8系统,都会有如下的提示:

lwk@qwfys:~$ ssh root@172.16.154.168

 

Activate the web console with: systemctl enable --now cockpit.socket

 

Last login: Mon Jun 15 10:53:00 2020 from 172.16.154.164

[root@harbin ~]#

提示的意思是说,通过命令systemctl enable --now cockpit.socket可以开启一个基于Web的系统控制台,后续管理主机的时候,通过这个web控制台,也是可以管理系统的。

 

那么,我们有没有办法取消这个提示呢?我们知道通常情况下,Centos系统的文本登录界面中的提示信息是存放在文件/etc/motd或者目录/etc/motd.d/中的,那么,我们来找一下看看吧。

 

[root@harbin ~]# ll /etc/motd.d/

total 12

drwxr-xr-x.  2 root root   21 Feb 18 15:59 .

drwxr-xr-x. 97 root root 8192 Jun 15 11:00 ..

lrwxrwxrwx.  1 root root   17 Nov  9  2019 cockpit -> /run/cockpit/motd

[root@dph000 ~]# cat /etc/motd.d/cockpit

Activate the web console with: systemctl enable --now cockpit.socket

 

[root@harbin ~]#

 

我们可以看到,文本Activate the web console with: systemctl enable --now cockpit.socket信息是存放在软连接文件/etc/motd.d/cockpit对应的文件中的,既然如此,那么,我们只要删除这个软链接文件,然后重新登录即可取消上述提示。

 

[root@harbin motd.d]# rm -rf cockpit

[root@harbin motd.d]# exit

logout

Connection to 172.16.154.168  closed.

lwk@qwfys:~$ ssh root@172.16.154.168

 

Last login: Mon Jun 15 17:14:54 2020 from 172.16.154.164

[root@harbin ~]#

31IDC - 12 年深耕海外 IDC 高端资源