DevOps virtualization
This lab is done on your CLI.
Using alias
Create an alias named whoosh that ssh’s into scratch.cs.dixie.edu
Create an alias named mygrep that prints the line containing root in /etc/passwd
Create an alias named psort that prints /etc/passwd sorted.
Create your own alias
Prompt
Create an alias called prompt1 which sets the variable $PS1 to the default prompt.
Create an alias called prompt2 which changes the prompt to [username@cli:working_directory$]
. (example: [carol@carol-cli:~$] )
Create an alias called prompt3 which is prompt2 but yellow. You might find the following website helpful [prompt_colors] (http://cit.dixie.edu/it/1100/files/linux_text.pdf#page=190&zoom=100,144,230)
Create your own prompt4.
Personalizing your account.
Put your alias’s in the .bashrc (including the prompts)
unalias -a
which will remove all aliases.source .bashrc
Make a welcome message and put it in the .bashrc.
Example: echo “"”Big text here”””
Put your command as the last line in the .bashrc
Personalizing the exit
Print a message to the user when they logout. Use the echo command like you did for the .bashrc.
Put a command in the .bash_logout
file.
Everytime you log out, put a message in $HOME/log.txt
that also says the date and time.
The grading script will look that you have at least 2 echo
statements in your bash_logout. If you do not, it will fail.
The grading script will be run as you are logged into scratch. The command you will execute will be similar for all of
your assignments that have an autograder. Here is a sample of the command you will run: run_grader.py --n 2 --ip 1.2.3.4
. The 2 is representative of lab2. (Lab 3 would replace the 2 with a 3). NOTE you will pass in the ip address of your virtual machine that you have created. You will see some feedback. You should make sure that all your tests pass and that your score is correctly recorded. Please see your instructor for any help or questi ons on the output.