This page has instructions for various tasks you might wish to do to customize your environment or perform a few other common tasks under the Linux operating system running on the Shared Computing Cluster (SCC).
Topics
- Setting default project
- Changing your shell
- Basic dotfiles
- Setting up a .forward file
- Setting environment variables
- Adding items to your path
- Create shortcuts with the ‘alias’ command
- Additional help/documentation
Setting default project 🔗
Each account on the system has an assigned default Project. Any computing resources you use will be applied to it. You can see the list of projects that you belong to by typing groups
on the command line. The first one listed is your default project. Note that Projects are implemented as Linux groups.
Four ways to control your default project:
- When you submit a job you can override the default by using the
-P projectname
flag. - For frequent use, you can include
-P projectname
line in the .sge_request file in your home directory. - You can change the project for the current session by typing
newgrp projectname
on the command line. - You can permanently change your default project on your individual Research Computing User Information page. Your default project will be changed the next time the system configuration files are updated, generally overnight.
Changing your shell 🔗
New accounts on the SCC are currently set to use the bash shell . You can switch to the tcsh or zsh shell on your individual Change Shell Form. You can run the command printenv SHELL
or echo $SHELL
to see which shell you are using.
Basic dotfiles 🔗
Dotfiles are special files and directories in your home directory, with names starting with the dot/period (.) character. These files generally control your environment, for example setting environment variables such as your PATH.
The content of the dotfiles (such as .bashrc, .cshrc, or .login) are set to reasonable defaults for new accounts and you should be very careful in modifying them as it can lead you to being unable to log in to the system or cause other major difficulties using your account. If by any chance you delete or corrupt one of your dotfiles, you can run the command dotfiles
to back up your existing dotfiles and install new dotfiles which should provide you with a good, basic working environment.
- bash users ->
.bashrc
– This file is usually the one which is modified, for bash shell users, to change yourPATH
or set other environment variables. - tcsh users ->
.cshrc
– This file is used just like its bash equivalent .bashrc for tcsh users. This file could also be named .tcshrc. - zsh users ->
.zshrc
– This file is used just like its bash equivalent .bashrc for zsh users. - all users ->
.forward
– This file is used to forward your email and is explained in Setting up a .forward file section.
Setting up a .forward file 🔗
Your .forward
file contains an email address that is used to forward emails sent to your_login_name@scc.bu.edu
, for example emails related to your batch jobs. By default this email is set to be your @bu.edu BU email address.
If you are not receiving emails going to your_login_name@bu.edu
, or you would like to get them at a different address, you have a different issue. Please follow these instructions on how to use BU’s email forwarding tools.
Setting environment variables 🔗
Environment variables are named values, stored within the system and used by applications. They allow you to customize how the system works and how applications behave on the system. For example, the variable HOSTNAME
is usually set to indicate the name of the system you are on, such as scc1
. All environment variables have names in ALL CAPS and you can get a list of all the environment variables you currently have set in your current shell by issuing the command printenv
. You can set an environment variable or assign a new value to an existing environment variable. For example, to change the default editor in your current shell to emacs
, execute:
bash and zsh shell -> scc1% export EDITOR='/usr/local/bin/emacs'
tcsh shell -> scc1% setenv EDITOR /usr/local/bin/emacs
If you often need to set a given environment variable , you may want to add the appropriate export
or setenv
command to one of your dotfiles, such as your .bashrc
or .cshrc
. If you do this, the variable will be set every time you open a new shell. However, if you wish to immediately take advantage of this change without logging out or starting a new shell, execute source .bashrc
or source .cshrc
.
Adding items to your path 🔗
PATH is an environmental variable that tells the shell which directories to search in for a command or an executable file. If the system returns a message saying “command: Command not found
“, that indicates that either the command doesn’t exist at all on the system or it is not in your path. For example, to run exampleapp
, you need to directly specify the path to your application: /path/to/your/app/exampleapp
or you need to have the directory /path/to/your/app/
in your path:
bash and zsh users -> [scc1 ] export PATH=$PATH:/path/to/your/app/
tcsh users -> scc1% set path=($path /path/to/your/app/)
Also, note that the order in which items appear in your path is important as, if two items have the same name, the one which is in the directory appearing earliest in your path will be executed.
You can add path changing commands to your dotfiles, such as your .bashrc
or .cshrc
, so that you do not have to change your path manually every time you log in. A good practice is to put the most important directories towards the front of your path (examples: /bin
, /usr/bin
, /usr/local/bin
) and your current directory ( .
) and application-specific directories towards the end of your path.
Create shortcuts with the ‘alias’ command 🔗
The alias
command can be used to create an easy to type shortcut for long and/or frequently used commands. This is a convenient tool for avoiding errors and saving typing. To make aliases permanent, add them to your .bashrc
file:
# create an alias to change directory to a project subdirectory
alias cdwd="cd /restricted/projectnb/myproject/myspace"
# create a convenient shortcut to give a detailed list of all files in a directory
alias dir="ls -laF"
Additional help/documentation 🔗
If you have problems or questions about any of this, please send email to help@scc.bu.edu.
We also have a tutorial on Linux which we generally offer live three times a year but for which the video and slides are always available.