Ubuntu Linux

Using Linux

Ubuntu and other flavors of Linux are not supported by UiO IT-services, except for RHEL and Fedora. Support is a requirement for using the main/internal network, since all computers here need extra protection; they were installed at/by UiO and are remotely managed (also during the night) by the UiO IT-services. These computers must run either Win10, RHEL7+, Fedora or MacOS; dual boot on stationary computers makes management difficult and is something the technical crew will make a large effort to avoid.

At our department, the need for different flavors of Linux is recognized and you can download and install e.g. Ubuntu on your own, but then you must of course also manage the computer on your own. The department technical crew can provide only a limited amount of help to self-help. It is not difficult to install e.g. Ubuntu. We recommend that you avoid dualboot even on a laptop; virtualization provides a better way.

Information security is very important and the department insists that you comply with the requirements of the UiO IT-services as regards self-managed computers. Among other things, it is a UiO requirement that you install software security updates frequently and use very good passwords.  A break in on your computer can lead to serious problems for UiO as a whole, and not only for your computer/files. Please do not enable remote login, webservers or other server-type of services. If you cannot avoid it, install the packages intended to prevent bruce force attacks. And set up /etc/hosts.allow to only accept connections from your places.

Here is some help to get started

  • Download the iso-image of Ubuntu Desktop and write it to the memory stick using  e.g. "dd  if=file.iso  of=/dev/sdX  bs=100M", make sure X is the right letter or you will overwrite and destroy the contents of your harddrive (so normally you wouldn't use sda). You can use "fdisk -l" to view the disks in the computer.
  • Disable secure boot in the bios setup  (to enter the bios, when the computer starts to boot, press F2 on Dell computers, F10 on HP computers).
  • When installing, you can install the updates at the same time. Use the networking icon on the top right to connect to Eduroam.
  • Don't do any tailored partitioning, just continue with the defaults.

After the installation

Computers that run Linux can use Eduroam  or must be cabled to a specially secured (802.1x) wall outlet. Once the user has provided her UiO username and corresponding password, the computer is allowed to connect to the Internet.

For a desktop computer you must first enable 802.1x on your network interface. Click on the network icon in the upper right corner on the desktop, select "Edit Connections". Double click on the relevant interface (usually Wired Connection 1).  Check "Use 802.1x security for this connection". Also make sure that Authentication is set to PEAP.

It's possible to make the familiar UiO-services available on Ubuntu, among these are:

The examples below are command based. (Some of the examples could be done entirely in the graphical user interface, but not all.) To issue the commands you first have to open a terminal window. Start with the button "Search your computer and online sources" on the top of the application launch bar at the left of the desktop. Search for 'terminal'. Drag the terminal's icon down to the application launch bar, to have it available for later.

A short course in the use of the command line

The examples below should not be typed, they should be copied from this webpage and pasted into the terminal window. In Ubuntu, copying is done by marking the text. Mark text by moving the cursor from beginning to end of the text while holding the left mouse-button down. Afterwards, the marked text is pasted into the terminal window by positioning the cursor in the terminal window and clicking the middle mouse-button.

If necessary, the commands can be edited using back-arrow and forward-arrow keys (before you press Enter). You can use Ctrl-A (Hold Ctrl-key down and type an A) to advance to the beginning of the line, and Ctrl-E to move to the end of the line. Ctrl-F does same as forward-arrow, and Ctrl-B does same as back-arrow.

Once you have typed a command and pressed Enter, the command is saved for later. Next time you use your computer, use up-arrow and down-arrow keys to search for the commands. Or Ctrl-P (previous line) and Ctrl-N (next line). You can also type e.g. !sshfs to run the sshfs command again.

The Tab-key helps you when you have to type in a command. There is no need to type in the whole command. Type only as many characters as necessary and then complete with the Tab-key.



Direct access to the UiO home folder

Issue the following commands in a terminal window. First three commands to set things up (once):

 sudo  apt-get  install  sshfs


 mkdir  uiohome

Then these two commands (every time) to (re-)establish the direct access:


 sshfs   $USER@login.uio.no:    uiohome

where the text '$USER' should be replaced with your UiO username. You will be asked to provide a password; type in your UiO password. The files and subfolders in your UiO homefolder will afterwards be directly available in the folder named 'uiohome'.



Print directly to a UiO network printer

1) First you might want to test this manual way to print:

Open the document in evince. Print to file, and make sure to select PostScript as the output file type. In this way you will create a PostScript file that you can print.

Now run this command:

             smbclient   -U username   -W uio   -m smb3   //pullprint.uio.no/ricoh

You need to replace the slanted text with your UiO-username. (If you want to send the printout to an older printer with a name, replace pullprint with pushprint and ricoh with the name of the printer.) When asked for a password, enter your normal UiO-password.

When you get the smb-prompt, type in:

             put filename.ps

where filename.ps is the name of the PostScript file that you want to print.

2) To get printing directly from the applications to work, make sure that you have "workgroup = UIO" and "client max protocol = SMB3" in /etc/samba/smb.conf. You might also need to add "AuthInfoRequired username,password" for the relevant printer in the file /etc/cups/printers.conf. (Do not replace "username,password" with your username and password!! You will be asked for those later, when printing.)

Use this URL in the printer setup dialog:


where username is your uio-username (eight or less lowercase letters).




Indirect UiO backup

Files on your local harddrive are NOT protected. If the disk breaks down your data are lost. (You may however pay some 3000 kr to a company to attempt recovery, and then pay an additional 7000 for a recovery IF a recovery is possible.) To avoid data loss, please keep a copy of the most important data (such as personally authored documents) in your UiO homefolder -- this is the way you achieve indirect UiO backup.

You can of course also keep extra copies on a USB memorystick or on an external harddrive. Try not to keep important data in just one place, but if you cannot avoid it, keep the one copy in the UiO homefolder. Copies of important data should ideally not be stored in the same physical location; fortunately the data in your UiO homefolder are automatically copied to a UiO central backupserver, usually every night.

Non-sensitive data can be stored (and optionally shared with others) in the cloud, see http://askubuntu.com/questions/442430/what-are-the-alternatives-to-ubuntu-one.

The UiO homefolder is not suitable for storing huge amounts of workdata, please contact it-hjelp@fys.uio.no to request a new storage area.



Using Microsoft Windows from Ubuntu Linux

Install the remote desktop application (once):

 sudo apt-get install freerdp

Then connect to a windows terminal server:

 xfreerdp    -u $USER    -d uio    win.uio.no

You may replace $USER with your username. When asked, type in your UiO-password.

If you want to use copy&paste between Linux and Windows desktops, instead use this command:

xfreerdp   --plugin cliprdr    -u $USER    -d uio   win.uio.no

Instead of issuing these commands you can try a graphical RDP client. Search for "rdp" (press button "Search your computer and online sources" on the top of the application launch bar at the left of the desktop) and you should find Remmina Remote Desktop Client. In Remmina, the domain 'uio' must be specified when a new connection is defined.



Using LaTeX on Ubuntu Linux

Install TeX Live (once):

 sudo  apt-get  install  texlive

Open the Ubuntu Software Center (which you will find in your application launch panel on the left side of the desktop). Under application category 'Office' you will find several LaTeX-related applications.



Using Matlab on Ubuntu Linux

You can use this installation of Matlab only as long as you are a student or employee at UiO.

First establish a tunnel to login.uio.no by issuing the following command in a separate terminal window:

 sudo ssh -N -L 873:app-sync:873  $USER@login.uio.no

You should replace $USER with your UiO username. When asked, type in your UiO-password. The command will then hang. Just leave that window alone. If you close the Window, the tunnel will be closed.

Then download and install Matlab. Ten gigabytes will be downloaded and this takes a long time:

 sudo rsync  -a  localhost::rhel6-x86_64-matlab  /opt/matlab

Finally add the necessary Matlab support to Ubuntu:

 sudo apt-get install matlab-support

The installation works on 64-bit Ubuntu.

Do not run Matlab when using sudo, not even the first time. If you do, a folder ~/.matlab (i.e. a folder in your home directory that starts with a dot) will be created and it will be owned by root and prevent Matlab from working later.







Do ssh from outside to your office computer

When you are in your office, make a note of the ip-address that the Ubuntu computer is using:

 sudo   ifconfig  -a

for example

On your home computer, create an SSH-tunnel to UiO:

 ssh   -NL   12345:   $USER@login.uio.no

As usual, $USER should be replaced with your UiO username. Also the ip-address should be replaced with the one that is actually used by the office computer.

Now, in a different window on your home computer, connect to your Ubuntu computer:

 ssh  -p 12345   localhost

One end of the tunnel is at port 12345 on the local computer. The other end is at port 22 of the computer at UiO with ip-address The tunnel passes through login.uio.no, which serves as a kind of relay.





Choose your desktop

Several different desktops are in fact available for installation. You select which one to use by clicking on the cogwheel that appears at login time. The cogwheel appears after you have typed the username but before you type the password.




Published Oct. 30, 2014 2:57 PM - Last modified Aug. 29, 2019 5:10 PM