Changes

Jump to: navigation, search

OPS245 Lab 4

23 bytes removed, 19:26, 23 January 2021
m
Part 2: How do we Manage Runlevels?: - switching to modern terminology
Running Linux servers in graphical mode can make the server vulnerable to penetration (i.e. a potential break-in to the server from unauthorized intruders). The X-windows framework can be vulnerable to attacks when these servers are connected to the Internet. This is why when you install '''server versions''' of Linux, they work in text-based mode only. Desktop versions of Linux are then installed on workstations (working in graphical mode) that connect to the '''Linux server''' (for security reasons since those servers are closest to the router and the Internet).
The Linux sysadmin can also change the run-level target (or state) of a graphical Linux server to run in text-based mode and run the graphical mode by issuing a command when graphic mode is required. The You may also encounter this capability described as run-level levels, but that term is now deprecated in Fedora/RHEL/CentOS, but for now you will still encounter this terminology in industry.
{| width="50%" align="right" cellpadding="10"
|- valign="top"
# Issue the following Linux command: <b><code><span style="color:#3366CC;font-size:1.2em;">systemctl get-default</span></code></b><br><br>'''Note:''' The output should read '''graphical.target'''
# Try the same command on your '''centos3''' VM and observe how the output differs. Go back to your '''centos3''' VM.
# You can use the '''systemctl isolate''' command to change the current run-leveltarget. See a list of runlevels targets [https://www.centos.org/docs/5/html/5.2/Installation_Guide/s2-init-boot-shutdown-rl.html here].# Change the current run-level target in '''centos1''' to '''multi-user.target''' by issuing the following command:<br><b><code><span style="color:#3366CC;font-size:1.2em;">sudo systemctl isolate multi-user.target</span></code></b>
# What did you notice?
# Reboot your '''centos1''' VM. It should return to the graphical login screen. You should notice at this point that the command '''systemctl isolate''' did not change the default target the system will boot to.
# Issue the <b><code><span style="color:#3366CC;font-size:1.2em;">sudo systemctl set-default multi-user.target</span></code></b> command (with elevated permissions) to change the current defatult run-level default target in '''centos1''' to '''multi-user.target''', then reboot your machine. What do you notice?
# Change the current run-level in '''centos1''' to '''graphical.target''' by issuing the following command:<br><b><code><span style="color:#3366CC;font-size:1.2em;">sudo systemctl isolate graphical.target</span></code></b>
# Try to do the same thing to your '''centos3''' VM. Did it work? Why or why not?
932
edits

Navigation menu