Linux Run Levels

Ticker

6/recent/ticker-posts

Linux Run Levels

Question : New tools have been installed on the app server in Stratos Datacenter. Some of these tools can only be managed from the graphical user interface. Therefore, there are requirements for these app servers.

On all App servers in Stratos Datacenter change the default runlevel so that they can boot in GUI (graphical user interface) by default.


Please Note :-  Perform the below commands based on your question  server,  user name & other details might differ . So please read task carefully before executing. All the Best 👍


Solution:  

 1. At first login on all app servers   & Switch to  root user

thor@jump_host ~$  ssh tony@stapp01

The authenticity of host 'stapp01 (172.16.238.10)' can't be established.

ECDSA key fingerprint is SHA256:f2czcv1NMHGlUgF68QtDpeD8pYGn0Fp59a911+CBSWY.

ECDSA key fingerprint is MD5:03:6f:cb:d1:fd:df:de:46:0e:38:86:30:df:af:f7:2a.

Are you sure you want to continue connecting (yes/no)? yes

Warning: Permanently added 'stapp01,172.16.238.10' (ECDSA) to the list of known hosts.

tony@stapp01's password:

[tony@stapp01 ~]$ sudo su -

 We trust you have received the usual lecture from the local System

Administrator. It usually boils down to these three things:

     #1) Respect the privacy of others.

    #2) Think before you type.

    #3) With great power comes great responsibility.

 [sudo] password for tony:

[root@stapp01 ~]#

  3. Run Below command to check the default run level              

[root@stapp01 ~]# systemctl get-default

multi-user.target

[root@stapp01 ~]#


4. Run Below command to change the run level to graphical.target
        

[root@stapp01 ~]# systemctl set-default graphical.target

Removed symlink /etc/systemd/system/default.target.

Created symlink from /etc/systemd/system/default.target to /usr/lib/systemd/system/graphical.target.

[root@stapp01 ~]#


5. Post set default start graphical service & validate  the status

[root@stapp01 ~]# systemctl status graphical.traget

● graphical.target - Graphical Interface

   Loaded: loaded (/usr/lib/systemd/system/graphical.target; enabled; vendor preset: disabled)

   Active: inactive (dead)

     Docs: man:systemd.special(7)

[root@stapp01 ~]#

[root@stapp01 ~]# systemctl start graphical.target

[root@stapp01 ~]# systemctl status graphical.target

● graphical.target - Graphical Interface

   Loaded: loaded (/usr/lib/systemd/system/graphical.target; enabled; vendor preset: disabled)

   Active: active since Thu 2021-06-24 15:39:28 UTC; 1s ago

     Docs: man:systemd.special(7)

 Jun 24 15:39:28 stapp01.stratos.xfusioncorp.com systemd[1]: Job graphical.target/start finished,...e

Jun 24 15:39:28 stapp01.stratos.xfusioncorp.com systemd[1]: Reached target Graphical Interface.

Hint: Some lines were ellipsized, use -l to show in full.

[root@stapp01 ~]#

[root@stapp01 ~]# systemctl get-default

graphical.target

[root@stapp01 ~]#


                Please Note :- I have showed only for stapp01
You have to do this in all app server  stapp01,stapp02, stapp03. 

 6.  Click on Finish & Confirm to complete the task successful

Happy Learning!!!!


Apart from this if you need more clarity,  I have made a  tutorial video on this , please go through and share your comments. Like and share the knowledge





Post a Comment

1 Comments

Latest Posts

KodeKloud Kubernetes Security CKS  Lab Challenge 4 |  Audit-policy | Install & configure falco utility | Inspect the API server audit logs and identify the user