Lab 03 ‐ Linux Configuration - Isaiah-River/SYS-255-02-SYSAdmin GitHub Wiki
To start our lab we began by cabling our DHCP VM to the LAN. After this I logged into my DHCP VM and logged into the root account with the password Ch@mpl@1n!22. After this I used the command ifconfig to confirm that I do not have an IP address assigned. After this I use the command nmtui to access the Network Manager TUI application. I then select the edit connection option, and tab to the IPv4 configuration and change it from automatic to manual. I then set the address to 10.0.5.3/24, and set the default gateway to my firewall - 10.0.5.2, as well as my DNS server - 10.0.5.5, and finally I set the search domain to isaiah.local.
After this I confirmed my settings and went back and set the hostname to dhcp01-isaiah.
I then quit and use the command clear to remove the blue overlay left on my terminal.
I then used ifconfig to determine if I had an IPv4 address, though I currently do this wont always be the case, in which I can fix by using the command systemctl restart network, and then I use exit to make sure the host name has changed as well. After logging back into the root account, I use the command useradd isaiah to add a new user, and give the user a password with passwd isaiah. After this I gave my newly created account admin privileges with usermod -aG wheel isaiah. Wheel is the administrative group on cintOS. After this I use the command sudo -i and enter my password to bring myself out to root. After all this I logged into my adm account on my AD01 VM, went to DNS manager, and created forward lookup and reverse lookup zones for my dhcp01 VM (10.0.5.3)
After this I logged into my created account in CintOS and pinged google.com, ad01-isaiah, and fw01-isaiah.
I then logged into the wks01 VM and pinged dhcp01-isaiah by its name to show that I am able to ping by hostname alone.
I then remote accessed into my dhcp01-isaiah VM from my wks01-isaiah VM using the command ssh isaiah@dhcp01-isaiah, and then typing yes to continue connecting, and supplying my password.
After this I learned some basic commands for navigating and moving around CintOS.
- pwd - Shows the present working directory
- cd /home & ls - (cd /home) Navigates to the home directory and (ls) lists the content
- cd .. - Uses a relative cd command to direct to the parent directory
- ls -l - Long lists the files and directories in the present working directory.
- man hier - Shows the manual telling what each hierarchy in the directory is used for.
- **cd ~** - Shortcuts back to the home directory.
- mkdir (NAME) - Makes a directory in the present working directory.
- rmdir (NAME) - Removes a directory in the present working directory.
- yum install -y tree - Tries to install the "tree" package, which it is unable to as the named account does not have privileges to install software.
- sudo install -y tree - sudo elevates the privileges to execute as a super user for one execution. In this case it is used in order to install the tree package. Requires password input.
- groups - Shows the groups in which the current user has been assigned to.
- sudo -i - Become root for an extended period of time, very useful/necessary when one has many things to do in a privileged state. exit is used to exit out of the root shell when one is done.
- history | head -n 10 - Shows the history of the first ten commands I used saved in the history file. Alternatively history -n 10 would show the last 10 commands I used.
- **ls -la ~** - Shows hidden files within a directory.
- cat .bash_history - Concatenate (cat) is used to view the content of a file. In this case it is used to view the bash_history file.
- history -c - Clears the bash_history.
- history -w - Writes the bash_history with the current bash history.
- cp filename.txt /home/username/Documents
Some additional things not touched on in this lab:
- touch filename - Creates a file in the present working directory.
- rm filename - Removes a file in the present working directory.
- cp filename directory - Copies a file from the present working directory to another directory.
- mv filename directory - Moves a file from the present working directory to another directory