Logging in to users
- Run the ssh client
Use the values in the table below to connect to the virtual machine we'll be using in this class.
In the value for "host" listed below, the first part of the string, "users", specifies the machine, on the Unix network, that you will connect to.
ssh configuration parameter value protocol ssh ssh version 2 ssh port 22 host users.cs.umb.edu user name your Unix username Authentication method password
- Enter your password
A dialog box will appear on the screen into which you must type the password for your Unix account.- Confirm that you are connected
You should see the following:Welcome to Ubuntu 16.04.7 LTS (GNU/Linux 4.4.0-197-generic x86_64)- Set Up a script Session
Make sure you are in your personal home directory.cd $HOMEExecute the script command.script --flush it244_exercise_02.txt- Learn More About the Machine to Which You Are Connected
The uname command displays information about the machine you are using.uname -aWhen used with the -a option, uname displays more information than just the name of the machine.Your Shell
- Determine Your Current Shell
The easiest way to determine your current shell is to use the ps (process status) command.psThe ps command shows all your running processes, including your shell, bash.Explore Your Home Directory
- Learn Your Current Location
At every point in your Unix session, you are working inside some directory.
When you log in, you will be in your home directory.
You can create subdirectories inside your home directory, and customize your environment through special files located here.
To determine your current location, you will use the pwd command, which stands for "print working directory".pwdNotice that your home directory has the same name as your username, and is located inside /home.
This is true for all users.- Look at the Contents of Your Home Directory
The ls command (for "list"), when used with no arguments will display the contents of your current directory.lsYou should see at least one directory - it244. This is where you will submit your homework assignments.- Look at Your "Invisible" files
ls, when used without the proper option, ls will not show files whose first character is a ".".
These special files are used to change features of your Unix environment.
To see these files, you need to use ls with the -a option:ls -a- Forward Your Unix Account Emails to Another Email Address
You can forward the emails sent to your Unix email account by creating a .forward file.
The .forward file contains the email address you want your Unix email to be forwarded to.
To do this, we will use a Unix trick.
Since I haven't introduced you to a Unix text editor yet, we'll use the cat command instead.
Later, when we talk about redirecting the input and output of a command, you'll understand why this works.
Where I have written "Control D" below, you should hold down the Control key while pressing the key for the letter "D".
Where I have written YOUR_EMAIL_ADDRESS, enter your UMass Boston e-mail address. Where you see [Enter], that means to press the Enter key.cat > .forward [Enter] YOUR_EMAIL_ADDRESS [Enter]Press Ctrl-d and then press the Enter key- View the Contents of the file you just created.
cat .forwardIf you make a mistake, simply repeat the procedure.
The file contents will be overwritten by the new text you enter.- Test your .forward file
Send an email to YOUR_UNIX_USERNAME@cs.umb.edu
If forwarding is working, then you should see this message in your email account after a minute or two. If you get an error message, or nothing happens, then don't worry about it.- End your script Session
Use the exit command.exitConfirm you are in your home directory now.pwdConfirm your it244_exercise_02.txt file exists.ls