This article is a work in progress. Please excuse any missing information or not so complete sections. If you have any suggestions or want to report something about please send an email to the helpdesk. Thank you
The purpose of this guide is to give a brief introduction to linux. Linux is the operating system we use to host most of our computational resources here at ISYE. It is written to give someone who has never really used the OS before or never really needed to know how before now.
If you are looking for a more advanced guide the internet has a few you can use. The website:
Has many guides and how-tos for specific issues you may have. I have used it for years and many subjects I will refer to here are inspired from articles on this site.
This is not a guide to HTcondor. If you are looking for that and you have a good grasp on linux you can find a starter guide to condor here:
How to Access Hosts
This guide assumes you have already An ISyE Unix Account:
And have received notification from the ISyE IT staff that your account has been activated on our servers.
Logging in remotelyIf you are trying to access our HTcondor cluster or a different host other than a linux desktop you may have in your office you'll have to remote into the host you want to use.
Remote accessIf you are any where other than physically within the school (this includes other parts of campus or on the wireless) then you'll need to first connect to castle.isye.gatech.edu or keep.isye.gatech.edu. Once logged in to castle or keep, you can simply 'ssh ' from there.
You'll need a terminal program for this. A terminal program is used to connect to a linux machine and execute commands on it. Even if you plan to use a gui (Graphical User Interface) such as an IDE, web browser etc you'll first need a terminal program to execute the necessary commands to start your gui. I am going to list a few programs here but won't go over how to use these. The documentation associated with programs listed here is pretty good.
- SecureCRT is a program that is installed as a standard on desktops in the School. Documentation is available from the help menu from within the program
- Terminal.app on OSX is standard on all apple desktops with the necessary software to connect to ISYE linux hosts
I touched on this earlier but want to make clear here. While its possible to start a GUI once logged in, the linux hosts here are all textmode or CLI (command line interfaces).
Most of the remote hosts you'll interact with will concern HPC (High Performance Computing) and alot of GUI interfaces are slower because of those GUIs. So at least in this arena we avoid them unless absolutely necessary.
If you are familiar with Windows you may be use to the fact that Windows is mostly case insensitive with the only exception being usernames and passwords.
Linux is case sensitive not only with username and passwords but with file, directories and commands.
Here are some examples:
|Windows||Info.txt||info.txt||This is the same file.|
|Linux||ls||Ls||Not the same command (Ls is not a command at all and will give back an error)|
Again, your login credentials are case sensitive. Its a common error people make so keep that in mind...
By now, you've connected to '' and the host should be asking for your username and password.
At the username prompt you'll need that login name you received from the unix account creation process covered above. Once typed in hit the Enter key
At the password prompt, you'll notice that when you type keys the screen does not respond and the cursor might not even be there. This is by design.
By default, the password remains hidden from the screen as you type for obvious security reasons, but continue to type it and the hit Enter key when finished.
If the information is correct it will log you in. If not, it will display a message asking you to retype your credentials.
Logging outTo logout of the system, simply closing the terminal program can have undesired effects. To truly logout of your session make sure to type either 'exit' or 'logout' at the command line. Most apps can be set to exit if you log out of the session you first connected to when the program started, but they are usually not set to do so by default.
At this point, this guide assumes you were successful logging into your linux host. If not, that needs to be solved first. Please go over the instructions above and make sure you didn't miss anything. Then, if it still won't let you log in, skip to the 'Getting Help' section further down in this document.
If you've never used a CLI (command line interface) this is how it works.
a command is a basic program you want the computer (linux) host to perform.
For example, if I wanted to list the files in my current directory the command for this would be...
After typing 'ls', I would hit the Enter key and the output of this will be the filenames and subdirectories in your current working directory.
Commands can be given options as well. If you wanted to list the files in a specific directory other than the one you are current in this is what you'd type:
After typing this on the command line and hitting the Enter key the system would ls or 'list' all the files and subdirectories under /home/cns/work/applications.
Below are more basic commands necessary to start using linux hosts:
|ls||list files and subdirectories|
|mkdir||creates a new directory|
|pwd||print working directory|
|logout||quits the current login session. 'exit' works the same way|
|man||manual. Used to lookup docs or a manual on a command. (see below)|
|info||information. Display information about a command.|
|hostname||prints the current host you are working on.|
|vim||A basic text editor VIM manual|
|nano||A simple, powerful text editor Nano Homepage|
Basic commands with options
Most commands have options and most of those require options to function
For example, in the above command 'ls' typed on its own assumes you want the current working directory, but you have the option to change the default option from displaying the working directory to another one like above.
If a command does not have a default option if you execute it on its own it will either display a brief usage message or directions on how to get a list of available options.
Command options can be passed with a dash or a double dash
A single dash is an abbrevation of the option and the double dash is usually a full word or description.
For example with ls. By default, it won't list hidden files. You can specify it to do so by using the all option.
Either using a single dash:
or a double dash
Will display the same content which is regular files plus hidden files.
Side note: A hidden file in linux is specified by a '.' at the beginning of the filename.
This file will not show up in standard file explorers like the ls command unless you specify you want to see hidden files.
This is an organization feature not a security one. Meaning, you would hide files you don't normally work with and want to get out of the way or in the above example a config file that if changed accidentally, moved or deleted would cause stability issues. This feature is not meant to keep the file from other people. Read further down on read permissions to make files private.
Basic Command Help
The commands you'll need to use here at ISYE will have documentation either on the system you're using or in our knowledgebase.
You can, for the most part, lookup a command on the internet to find quite a few articles and online manuals on the command but do so with caution. The commands detailed in this article and other articles at ISYE have been tested on our systems and are known to work. The same cannot be said for an article you find while 'googling.' Not to say, the article is wrong but there are factors that can differ from the author's system and ours that can greatly affect how a command responds and works.
So what do we need to look for in an article to make sure it has a good chance to get the same results for you as it did the author?
- Make sure the OS is either Redhat or a Redhat clone. (CENTOS, Fedora ...)
- The architecture is the same. We run mostly on 64 bit systems. If the author of the article is running a 32 bit system the results can differ.
- The version of the command you are reading about is the same (or close) to the version you're using. This can be found by running a -v or --version option with the command
With that said, the internet should be a option after the following is tried, because accessing enough basic command information can be easily found using the help options included with the command.
How you access this basic information can differ from command to command but the three most commonly used options are:
All three of these options will give the same information. This information can be enough to get off the ground but you may find you need more. In this case there are manuals.
To see the manual for ls you'd type:
For ls, the manual for it probably fits in the --help option but more complicated commands like 'sed' or 'awk' will have larger amounts of options and information about them that the --help option doesn't show.
At ISYE, by default, we use BASH (Bourne Again Shell) as a command processor on our linux hosts.
Listed here are a few BASH keyboard shortcuts you can use to make things a bit easier. Anything between brackets depicts an actual key. For example [CTRL] means the Control key on your keyboard:
|tilde||[~] represents your home directory in command options.||
cd ~will change to your home directory
|[UpArrow] and [DownArrow]||Scroll through past commands you've entered.||
cat ~/.historywill display a list of your past commands
|[CTRL]+[A]||move the cursor to the beginning of the commandline||Using these two shortcuts plus the UpArrow/DownArrow for your command history can make correcting a large command easier without having to retype it over and over again. For example, a 'gcc' command can easily have half a dozen options!|
|[CTRL]+[E]||move the cursor to the end of the commandline|
|[TAB]||command or filename completion||
cat ~/.hist[TAB][ENTER]Will display ~/.history
|[TAB][TAB]||list all matching filenames or commands||
cat ~/.[TAB][TAB]will display all the hidden files\directories in your home directory. The system will ask you to confirm the output of this shortcut if the output will consume most of the terminal screen.
The examples in the third column assume you have hit the [Enter] key after the command shown
Files and Directories
This guide assumes you are familiar with basic file/directory structures. Don't worry. If you are at least familiar with Windows or even Apple's OSX this won't be much different but there are a few points that need to be made. If you aren't aware of them they can cause problems and needless frustration.
- Everything is case sensitive - from files and directories to your username and password
- There are three types of users who can have access to your content: the owner(you),a specified list of other users(groups), and anybody else that isn't you or in the group assigned to the file.
- There are three types of actions you can preform on a file: read it, write which includes delete it or change it in any manner including renaming, and execute it
- There are several types of files in linux but for purposes of this guide we are going to look at only three: data files, directories and links.
Permissions are important to understand. Just as an example: If you work with scripts (python, perl, etc) you'll need to know if you're script is executable or not.
In order to examine linux permissions we will use an old friend from above 'ls' (very versatile command)
The option we will use to examine permissions is -l (extra points if you find out what exactly the -l option does. (We will also use -h which is not the help option. Aren't you glad you know about the command 'man'?)
mdanielson3> ls -ahl total 27K drwxr-xr-x. 3 mdanielson3 itstaff 6 Oct 29 14:38 . drwx------. 120 mdanielson3 itstaff 218 Oct 29 14:38 .. -rw-r--r--. 1 mdanielson3 itstaff 0 Oct 29 14:37 data.xls drwxr-xr-x. 2 mdanielson3 itstaff 3 Oct 29 14:38 docs lrwxrwxrwx. 1 mdanielson3 itstaff 18 Oct 29 14:38 important.doc -> docs/important.doc -rw-r--r--. 1 mdanielson3 itstaff 0 Oct 29 14:37 python.py
The output of this command will give you several columns but we are going to look at the first one.
the first column is a series of 10 characters: "-rw-rw-r--"
The first character signifies the type of file this 'thing' is.
|means a datafile|
|means a directory|
|means a link|
datafiles = These are simply data. This includes text files, documents, excel sheets and even python or perl scripts or even c++ executables.
directories = These are lists of other files (datafiles, directories, links)
links = most of your work won't involve these but these are shortcuts to other files.
The rest of the characters have to do with permissions and the characters are called 'bits' and they should be read in groups of three.
The first three bits belongs to you (or the owner)
The second three belongs to a list of other users(groups)
The third belongs to anyone else who isn't the owner or the group(world)
When read in groups of three the first 'bit' is the "read bit", the second is the write bit and the third the execute bit. A dash signifies a negative or no permission.
What does it mean to have read,write or execute permissions?
- READ: If you have read permissions to a file you can read the contents of the file, but if you don't have read permissions to a file you can't even see it listed in the file system.
- Note: this is not the same as putting a '.' in front of a file or directory to hide it. If you don't have read permission you cannot see it even with an 'ls -a' command like we went over earlier.
- WRITE: If you have write permission to a file you can open the file and change its contents but you can also rename the file or remove it completely (delete it) from the file system.
- EXECUTE: There are only two reasons you will need to adjust execute permissions to a file:
- You need execute permission on a directory in order to change into it (cd) in order to work with files its contains.
- If you develop a python or perl script you'll need to set the execute bit on it in order to run it
- Any other situation, please error on the side of caution and talk to us (see below) before setting the execute bit. Especially giving someone else execute permission.
Reading the permissions of files(Examples)
Take this example:
- this file is a data file
- the owner has read, write and execute permission to it.
- the group has read and execute permission but cannot change or rename(write) it.
- the rest of the world can do the same as the group.
- this is a directory
- the owner has read, write, and execute permission
- the group has read and execute permission
- no one else has access to it at all. This means that if you are not the owner or do not belong to the group associated with this directory you have no access to it. You can't rename it, list the files the directory contains and cannot move into it to examine them (execute it). Most important, you won't even know its there. Reading also means seeing it present in its containing directory.
How to change permissionsA great article that explains how to use chmod can be found here:chmod
At some point, you might come across something that isn't working the way it should or something isn't doing what you understand it should do. We would be happy to help in anyway we can.
Submitting a ticket
We have a ticket system that helps us keep track of the different tasks the school needs of us as well as making sure the right tasks are assigned to the right people making that much faster and easier to get the issue, problem resolved or question answered. To use this system simply send an email to 'helpdesk[at]isye.gatech.edu'.
So what should you include in your email:
- Your name
- Login name
- What you're trying to do, what happens when you do it and what you think should happen but doesn't.
- Directory path you are in when you are doing it. Running 'pwd' from above will give you the working directory.
- What host you're on when this happens. The command 'hostname' will give you this.
- Condor Only
- The jobid this task was assigned by condor. The condor kb article will show you how to get that. here