Lab 03 ‐ Linux - AidanP017/Aidan-SYS-255 GitHub Wiki
Overview
In this lab, we configured the operating system of CentOS and ensured its usability in the growing enterprise.
How to Edit Network Connections Using the NMTUI
To edit the network connections using the NMTUI, take the following steps:
- Enter nmtui
- Select "Edit a connection"
- Select "ens192"
- Set the IPv4 Configuration to "Manual"
- Type in the IP addresses and associated netmask under IPv4 Configuration > Addresses.
- Type in the default gateway under IPv4 Configuration > Gateway.
- Type in the DNS server(s) under IPv4 Configuration > DNS servers.
- Type in your domain under IPv4 Configuration > Search domains.
- Move your cursor to the bottom of the "Edit Connection" tab and select "OK"
- Move your cursor and select "Back"
- On the NetworkManager TUI, select "Set system hostname"
- Enter the hostname as desired and press the Enter key.
- Move the cursor and select "Quit" to leave the Manager.
- Back in the command line, enter the command systemctl restart network. This will restart the system as well as apply all of the above configurations that you established.
- Enter the command ifconfig. This should show you your updated network information that includes your above configurations.
How to Add a Privileged User in the CentOS Command Line
To add a privileged user in the CentOS command line, complete the following steps:
- Enter the command useradd "your first name"
- Enter the command passwd "your first name"
- Enter the new password for the new user and confirm the password.
- Enter the command usermod -aG wheel "your first name"
- Type exit. You should now be able to log in with the new privileged user's credentials.
How to Access DHCP01 Remotely from WKS01
To access DHCP01 remotely from WKS01, take the following steps:
- In WKS01, open Windows Powershell as a non-administrative user.
- Enter the command ssh "yourname"@dhcp01-"yourname".
- Upon asking you to continue connecting, type yes.
- Enter your DHCP01 password.
You should now be logged into the DHCP01 client remotely through WKS01.
Once you are logged in, you can view a list of DHCP01's ten most recent commands by typing history | head -n 10. You can also view hidden files by typing _ls -la ~_.
Important Commands:
- pwd --- Shows the present working directory.
- cd /home --- Navigates to the home directory.
- ls --- Lists the contents of the current directory.
- cd ... --- Navigates to the parent directory.
- ls -l --- Shows a list of files and directories.
- mkdir --- Creates a new directory.
- yum install -y tree --- Installs a "tree" package (with administrative privileges).
- groups --- Shows the groups in which a user has been assigned.
- sudo -i --- Allows a user to extend the time in which they are a root user.