CSIL Linux/UNIX FAQ

Currently, Ubuntu 18.04 LTS (Bionic Beaver) runs on all CSIL systems.

Please read Getting Started as a CMPT Undergraduate page for basic information about our labs and how to gain access to them.  Our Linux Command Line Survival page is started and expanding, including how to log on to CSIL Linux plus links to tutorials and other resources.

The Linux/UNIX Command Line Environment

This section relates to questions about the Linux/UNIX command line or Terminal applications.

What is the Linux/UNIX command line?
What is the Linux/UNIX Virtual Console?
What is a command shell?
How is my CSIL Linux/UNIX environment set up?
Can I change my CSIL Linux/UNIX Environment?

Special Notes on specific software packages

How do I run Eclipse?
How do I run versioning tools in CSIL?

top


The Linux/UNIX Command Line Environment

 

What is the Linux/UNIX command line?

The command line is a text-only interface that allows you to communicate directly with the UNIX operating system (O/S). Although it is text-only, the command line is vastly more powerful than the Graphical User Interface (GUI - pronounced "goo-ey") that most UNIX users use most of the time. All GUI applications on the Linux system rely heavily on the simple command line level UNIX commands when they need to perform input/output of any sort. There are many UNIX commands that can affect the O/S and its operation that can have a great deal of impact on the GUI applications but that the GUI user never sees.

Users can access the UNIX command line from the GUI, by running an application called "Terminal". You can find this application in your list of applications inside your menus. Linux users also have access to Virtual Consoles. Please read the next Q&A for important instructions.

We cannot teach you about all of the UNIX command line commands in this FAQ. There is extensive help for both new and experienced users alike on the Web.

 

top

What is the Linux/UNIX Virtual Console?

Virtual Console is the interface that system administrators use for Linux/UNIX systems when installing and repairing the OS, or other times when the graphical interface cannot be used, e.g. diagnose issues regarding login.

Linux users also have access to Virtual Consoles. There are six Virtual Consoles on each Ubuntu Linux workstation in CSIL, and you invoke them from the keyboard by pressing the key sequence CTRL-ALT-F1 to F6. Pressing CTRL-ALT-F7 will take you back to the GUI session.

CRITICAL:

You MUST log out of each Virtual Console that you login to. Logging out of the GUI session is NOT sufficient. If you logged in to a Virtual Console and did not log out, any other user coming along to your workstation after you had left CSIL would have full access to your account.

top

What is a command shell?

A command shell is a program that interprets what you type at the command line, and tries to make sense out of it. There are many different shells, each with its own peculiarities. Some popular ones are:

  • sh - the Bourne shell.
  • csh - the C shell.
  • tsh - the T shell.
  • bash - the Bourne-again shell.

Each time you log in to a UNIX/Linux system, you are starting a shell. This is true even if you only log in to the GUI session. Every UNIX user has a default shell, set by the system administrator who created your account. You cannot change this in CSIL, but you can run a sub-shell if you like. At the command line, simply type in the name of the new shell (for example, to invoke the 'bash' shell):

bash

To exit a sub-shell and return to the parent shell, enter the 'exit' command at the command prompt.

There is extensive documentation on the Web regarding UNIX command shells and their features.

top

How is my CSIL Linux/UNIX environment set up?

Your UNIX environment is controlled by your ENVIRONMENT and SHELL variable settings.

When you log on to any UNIX/Linux system, UNIX automatically sets a number of important environment and shell variables. Depending on which shell you are running, you can use the 'set' and/or 'setenv' commands on the command line to see these variables. Environment variables from your initial login are copied to each subshell that you open during that login session, but shell variables are not. Environment variable names are all upper case by convention, while shell variables are all lower case by convention.

The whole point of environment and shell variables is to store critical information that your applications rely on. For example, one of the most important environment variables is the PATH variable. The PATH variable holds the directories that are searched for application programs and their components, in the order of importance. If you have an application program or a program component that is in a directory that is NOT in your PATH, then the UNIX system will be unable to find it if it is not in your current directory.

To illustrate, say you PATH variable is set to:

PATH=/usr/sbin:/bin:/usr/bin/:/usr/ucb:/usr/local/bin

and you wish to execute the XYZ application that is installed in the directory:

/var/bin/XYZ

Unless you are in the directory XYZ from command prompt, the UNIX system will not be able to find your XYZ application.

top

Can I change my CSIL Linux/UNIX environment?

Yes.

See the shell commands that are applicable for viewing and editing your default and preferred command shell environment and shell variables. You can almost always override the pre-set defaults that we have set up for you.

For example, if your default UNIX command shell is 'bash', you could search the internet for web pages that match phrases like: 'setting bash environment variables'.

top


The Basics of Using Linux/UNIX Systems in CSIL

 

Where do I save my files on CSIL Linux/UNIX systems?

One and only one place: /home/username/sfuhome/

For UNIX/Linux users in CSIL, your home directory is set to /home/username/ by the system. This space is actually not located on any physical workstation in CSIL, but is automatically mounted for you at login time from a file server. This way, no matter which Linux/UNIX machine in CSIL that you log in to, you will have the same /home/username/ directory. Note that this is NOT the place to save your files. You should save files to your SFU Campus home directory, which is mounted as

/home/username/sfuhome/

Your CSIL /home directory is local to the CSIL network and may be ERASED without advanced notice. If you wish to save any of the files and directories you create while in CSIL on a permanent basis, you should save them to your SFU Campus home directory.

top

How do I access SFU Campus home directory?

When you log in to CSIL Linux, it is automatically mounted as /home/username/sfuhome  in your CSIL home. If for some reason it is not mounted, you should see a file called "@_This_IS_NOT_your_real_sfuhome_README.txt" in the placeholder sfuhome/ directory. Open a terminal session from Applications accessories on Gnome panel, and enter the command

mount.sfuhome

If that still does not mount your SFU home, please email helpdesk about it, with the name of the Linux machine and any error messages, and please try another Linux machine.

top

How do I check my space usage on a CSIL Linux/UNIX system?

Due to resource limitations, a quota is set on each user's storage space. If the quota is reached for a user, there are undesirable consequences, including inability to log on to the CSIL Linux GUI and possible data loss.

There are three quotas you need to be aware of as a CSIL Linux user:

1) The quota for your CSIL home is 2GB (gigabyte) as of March 2017.  This space is meant only for cache and other system files, not your own work, which should be in the SFU home.

2) The quota for your SFU home is 10GB (gigabyte) as of March 2016. You may find the current quota information about SFU homes on the IT Services site.

3) The quota for your CSIL scratch application space is a total of 8GB for storing your:

  • Virtual Box machines
  • Vagrant files
  • Android Sdk for Android Studio use

If you notice any of the above listed applications failing with what seems like a full quota and you know that your CSIL home has enough space, please check your usage in your /usr/shared/CMPT/VirtualBox/$USERNAME and remove some of the unneeded images and/or files.

To see exactly how much space you're using, login to a CSIL Linux system:

  • ssh to a CSIL Linux system (see the remote access section) , OR
  • login to a CSIL Linux workstation
    → if you fail to login at the GUI screen, press the key combination Ctrl-Alt-F1 to switch to a Virtual Console where you should still be able to login. Remember to log out of it!

Once logged in with your account, check if your quota is exceeded with the command:

quota -v

You should see your storage usage information.

To know more about which directories use the most storage, use this command at the Linux prompt:

du -sh  ~/*  ~/.??* | sort -n

This lists the files and directories (folders) in your CSIL home directory (that's what "~" means in the command above, aka profile folder) including your mounted SFU home space, sorted by the amount of space they occupy.

Note how much space the "sfuhome" folder occupies - if this number is close to the quota, please archive some of your files to other locations (not your CSIL home) and clean out some space.

You may also use the following commands at the Linux prompt:

cd
find . -size +10M -ls

This shows files larger than 10MB. Remove any such files you no longer need.

top

How do I share files with other Linux/UNIX users?

You can share files publicly, semi-publicly, to a group, or to a specific list of UNIX users.

Sharing files Publicly

Create a directory in your home directory which is eXecutable and Readable by all. The goal of this is to let every UNIX user list the file names in your directory without letting any other users write anything to your directory. Each file that you store in this directory should be readable by everyone, but likewise should not be writeable. For your directory then, enter the commands:

mkdir public
chmod a+rx public
chmod go-w public

This creates the sub-directory 'pub' in the current directory. Next, you can create files in this directory, and change their permissions to:

chmod a+r [one or more filenames]
chmod go-w [one or more filenames]

Sharing files Semi-Publicly

The goal here is similar to the above instructions, but here you create a directory in your home directory which is eXecutable but NOT Readable or Writeable by either the 'group' or 'others'. This approach prevents other UNIX users from listing the names of your files within your directory unless you tell them the file names. This presumably prevents them from listing or copying your file's contents. This solution however has two big security holes. It is known as "Security through obscurity", and is therefore NOT SECURE. If any other UNIX user can guess your directory's "hidden" file names, or someone who knows the names passes them on to other users, they can read or copy your files, just like users you do give your file names to:

mkdir semi_public
chmod a+x semi_public
chmod go-rw semi_public

Sharing files with a Group

Here the goal is to share files only with the UNIX group. For undergraduate students in CSIL this isn't terribly helpful, as every undergraduate student taking a CMPT course is in the same group:

mkdir group_files
chmod o-rwx group_files
chmod g-w group_files
chmod g+rx group_files

Sharing files with a Specific List of UNIX Users

This is not available on all UNIX systems, but is available on the Ubuntu systems in CSIL. This facility is known as Access Control Lists (ACLs), and these are set via the setfacl command. You can view the currently set ACL for a file or directory with the getfacl command. Check the man pages on your system or search the Web for tutorials on how to set ACLs. Here is a simplistic example:

mkdir secret_files
setfacl -m mask:rwx secret_files
setfacl -m user:[allowed_userid]:r-x secret_files

To see your ACL settings enter:

getfacl secret_files

How do I remotely access (remote login) CSIL Linux (Ubuntu) systems via ssh?

To access one of CSIL Linux CPU servers: from any modern secure shell client, enter the full name of one of our CSIL Linux CPU servers as hostname and use port 24 , and SFU Connect credentials. e.g.

ssh -p 24 cinux_cpu_server.csil.sfu.ca

or from CSIL Windows, run (windows key + r) :

c:\progra~1\putty\putty.exe -P 24 linux_cpu_server.csil.sfu.ca

More info: login to see our CSIL Linux CPU server FAQ page.

 

top

How do I remotely access CSIL Linux (Ubuntu) systems with GUI (X Window) interface?

(Currently not available)

top

May I install software for my course work on a CSIL workstation?

No.

Your account will be suspended if you attempt installing software in CSIL without permission.

There are two reasons for this policy:

  1. The School is responsible for the licensing of all installed software in the lab. Many applications that are downloadable from the Internet aren't free - they require licenses.

    Installing licensed software without a valid license is a criminal offence in Canada.

  2. Many applications make assumptions about where they place their files during the installation process and which environment variables they adjust. Installing software which makes unexpected assumptions can destroy your working environment.

You could make requests for the installation of course related applications (including shareware/freeware) through the instructors. Your instructors will make the request to the CS Technical Staff, who will examine the feasibility of all requests (cost, compatibility, network security, disk space requirements, etc.). Please make your requests as early as possible.

Please check out the special permission section of this page for more options.

top


The Linux Desktop Environment

 

What is the current Linux desktop in CSIL?

We have configured GNOME Classic as the default desktop on CSIL Linux systems. The only supported desktop in CSIL is GNOME. We have customized this to suit our environment. If there is any issue, please email helpdesk asap.

top

May I use Unity?

The Unity desktop is currently not supported in CSIL.

top

May I customize my Linux environment and use it on all CSIL Linux systems?

All of the Linux workstations in CSIL are now providing a "roaming profile" - which means that the user's desktop and program settings will follow the user between the workstations.

The switch depends on user authentication against SFU Active Directory on those Linux workstations. If you could not login to these Linux workstations binding to ADSFU, please do the following:

launch a web browser

navigate to URL: https://my.sfu.ca/ChangePassword

change your password

wait for 15 minutes

This process ensures SFU AD could recognize your account from Linux. You may try to login after the wait.

** Please note that you should only store your data under your campus home directory, which is mounted as

/home/username/sfuhome/

top

How do I know if I am using a roaming profile on CSIL Linux workstations?

While logon to a CSIL Linux workstation, run "df -h" on shell (terminal) and you should see a line like this in the output:

rcg-nfs02.its.sfu.ca:/csilhomes  500G   13G  488G   3% /cs/ugrad

If this line (the numbers may be a little different) exists, you are using roaming profile.

If you noticed that you are not using the roaming profile, please email helpdesk.

top


Special Topic on Permissions

 

Some of the applications I need for my course project need to be run as root/sudoer, what should I do?

First of all, do not run any application on any regular CSIL workstations or CSIL Servers as root/sudoer. Warning: If you attempt to run as root/sudoer on regular CSIL hosts, your account will be suspended.

Please contact your instructor/professor to find out which hosts to use.

If your course project needs root/sudoer access, CS Helpdesk will create a special set of systems for this course project upon instructor's request.

top

May I have root access to CSIL Linux systems?

No.

You don't have root access to regular CSIL systems and you won't be granted this access.

You may have root access on certain special hosts; please contact your instructor/professor for details.

If your course project needs root/sudoer access, CS Helpdesk will create a special set of systems for this course project upon instructor's request.

Warning: If you attempt to run as root/sudoer on regular CSIL systems, your account will be suspended.

top

May I have sudo access to CSIL Linux systems?

No.

You don't have sudo access to regular CSIL systems and you won't be granted this access.

You may have sudo access on certain special hosts; please contact your  instructor/professor for details.

If your course project needs root/sudoer access, CS helpdesk will create a special set of systems for this course project upon instructor's request.

Warning: If you attempt to run as root/sudoer on regular CSIL systems, your account will be suspended.

top

Which computers can I use for my Operating System (O/S) level programming?

Operating System (O/S) level programming - e.g. with fork() calls - must be done only on Linux workstations in CSIL.

No other hosts should be used on the SFU network. No exceptions.

top

May I do O/S level programming on any servers?

No.

Your account will be suspended if you do this on any server on the SFU network.

top


Special Notes on specific software packages

 

How do I run Eclipse?

When you launch Eclipse for the first time, you need to specify the workspace path. The default is something like this and it is WRONG!

/home/username/workspace

As you can see, it is not on the SFU Home.

The following folder is the best workspace for all CSIL users:

/home/username/sfuhome/eclipse/workspace

To run Eclipse on a CSIL Windows system, please click here.

top

How do I run a versioning tool in CSIL?

In CSIL, we provide Subversion and Gitlab as source code versioning systems.

Please check out this page for more details.

top

CSIL Linux Servers

CSIL Linux CPU Servers for CMPT students remote access (remote login) CSIL Linux systems off-CSIL
Subversion server: punch.cs.sfu.ca

for all CMPT students; each user has a repository for each course she is taking
Remote Linux Terminal Server for cmpt471: cs-vnl.csil.sfu.ca Used for: CMPT-471
CPU server for special courses: gemini.csil.sfu.ca

(Not available due to maintenance.)

for special courses

 

top


Did we answer your questions? If not, please check out our CSIL Linux Known Issues Page for additional information.

Go back to main CSIL FAQ page.

Last updated @ 2020.03.19