1.5. Logging In

In this section, you will login to your account on the computer science departmental server called Odin. We will do all of our programming this semester on this Unix server so you become comfortable working in a command-line Unix environment.

Access to Odin is restricted behind a firewall. In order to access Odin from off-campus, you will need to connect to UGA’s remote access VPN using the instructions found here.

Important

For CSCI 1302, you are expected to connect to Odin using SSH, and the programs described in the instructions provided by your instructor. While other programs may exist that also allow you to establish an SSH connection to Odin, use of certain programs is explicitly forbidden in CSCI 1302 since they consume large amounts of remote system resources, disrupting other students’ use of the system. You should NOT use any of the following programs to connect to Odin:

Using the programs mentioned above or programs like the ones mentioned above without permission violates sections 4.2 and 4.3 of the UGA Policies on the Use of Computers.

1.5.1. ssh

Your username on Odin is your UGA MyID and the password is the same one that is associated with your MyID. Once you are successfully logged into the VPN, open up a local terminal in your terminal emulator and execute the ssh (secure shell) command shown below to establish a secure connection – be sure to replace username with your MyID. When you type in your password, it will not display anything on the screen – this is the expected behavior. Simply type in your password, then press the return key to continue.

ssh username@odin.cs.uga.edu
../../_images/login-demo.svg

If you have trouble logging into Odin, then please contact support@cs.uga.edu as soon as possible.

Remember, when typing into a remote terminal, the commands that you enter are executed on the remote computer - not on your personal computer.

Command

Description

ssh user@hostname

Start a secure shell connection to hostname and login as user.

1.5.2. pwd

When you login to Odin, you are placed in your home directory (home folder). You can think of this as your own personal folder where your files will be stored on Odin. Any code you write in 1302 will be in a subfolder of your home directory.

You can see where your home directory is on the system with the help of the pwd (print working directory) command. It always displays the absolute “path” of the directory that you are presently in. It is called an absolute path, because it describes the path of directories that you would need to traverse to get from the root of the file system (i.e., the / directory) to the current working directory one directory at a time.

pwd
../../_images/pwd-demo.svg
/
└── home
    └── myid
        └── mepcott
  • What is the absolute path of your home directory?

  • What character does an absolute path always start with, and what does it represent?

Command

Description

pwd

Print the absolute path of the current working directory.

1.5.3. date, exit, whoami

Listed below are some easy commands that you can try out immediately, some of which you may have seen in earlier examples.

Command

Description

date

Print the system date and time.

exit

Exit the current shell.

whoami

Print the user name associated with the current user.

1.5.4. .bash_profile (Required Command)

To continue with this tutorial, the CSCI 1302 shell profile needs to be enabled on your Odin account. Enabling this profile is also required to complete coursework in CSCI 1302. A shell profile includes commands and setting customizations that take effect when the profile is sourced (loaded). This step will set up your programming environment for 1302. It will tell the system where to find the Java compiler and other tools that we will use throughout the semester.

If you see output that starts with [cs1302] when you login to Odin, then the CSCI 1302 shell profile is enabled on your account. Your output does not have to match the image below exactly as we often change the shell profile. If you see similar output, you can proceed to the next section of this tutorial.

../../_images/cs1302-profile-check-demo.svg
  • If you do not see any of that when you login, then the CSCI 1302 shell profile is not enabled on your account. To enable it, execute the command below. The command adds a line to the .bash_profile file in your home directory so that the profile is sourced each time you login. You won’t have to run this command again this semester.

    NOTE: Unlike some of the examples you’ve seen with mepcott (i.e., Dr. Cotterell’s username), the mepcott in the following command should NOT be replaced with your username. The command is provided by Dr. Cotterell to enable the CSCI 1302 shell profile on your account.

    /usr/local/mepcott/cs1302.enable
    
    #           |-------|
    #               |
    #    MUST USE "mepcott" HERE
    
    ../../_images/cs1302-profile-enable-demo.svg

Make sure that you logout, then login again before continuing. When you log back in, you should see output similar to what is shown in the video at the start of this section.

Congratulations! If you see the output above when you login to Odin, you have set up your Odin account. You’re now ready to login to a remote computer and develop software!