Linux help

  • Linux workstations

    Linux workstations at Diamond are configured with Red Hat 6 (currently) and the Gnome GUI. Login with your FedID or with a task specific user id (e.g. i99-detector) when directed.


    Many of our workstations use high-performance networked file systems to store and access your data. For this, and other reasons, workstations must not be re-booted or shutdown without guidance from the Scientific Computing team. 



  • Using a Diamond Linux workstation


    Your work may entail using either applications that are part of the Gnome GUI (e.g. DLS_launchers) or you may be running work directly in a shell (command line interface) environment.


    Most applications can be found by clicking on 'Applications' and in the submenus then displayed - This is similar to a Windows 'Start' menu. For example, to access your visit data using Nautilus, click 'Applications' -> 'System Tools' -> 'File Browser. In the File Browser window, select 'File System from the left hand panel and then the 'dls' file icon on the main panel, then select your beamline, select 'data' then the current year and you should now be able to see your visit.


    To access a shell, either select 'Applications' -> 'System Tools' -> 'Terminal'  or move the cursor to a blank part of the desktop, right-click and select 'Open in Terminal'.  To access your visit data from this shell, simply enter


    cd /dls/(beamline)/data/(year)/(visit) 



    cd /dls/i06/data/2016/ab12345-1


  • Your Home directory

    Home directory: (~, /home/fedid) Your home directory is your own personal file storage area. No one else can write here; you can set who has read access (by default everybody has read access). This area is served from a central location and is therefore visible from any Diamond Linux computer. The home directories are backed up regularly - You can find copies taken at various times in /home/fedid/.snapshot  


    Your Home directory may not contain more than 1 Gigabyte of data. You can check how close you are to your quota with the following command:-


    Where fedid is your login name.


    If you are close to your quota, you can see where the space is being used with your home directory with the following commands:-



    First, check that you are in your home directory with pwd:-

    [fedid@ws342 ~]$ pwd               

    [fedid@ws342 ~]$ du -m --max-depth=1 --exclude .snapshot ~ | sort -k1nr

     This will display the subdirectories in your home directory in decreasing order of size with the size in Megabytes in the left most column - e.g.


    [fedid@ws342 ~]$ du -m --max-depth=1 --exclude .snapshot ~ | sort -k1nr
    821    /home/fedid
    245    /home/fedid/Videos
    210    /home/fedid/Downloads
    116    /home/fedid/.mozilla
    111    /home/fedid/.cache

      You have to be aware that whenever a new Linux user account is created, its home directory permission is set to 755, which allows everyone to read your files. Permission 755 means that when people login with ssh or directly on the Linux box, they can browse, read and execute other people's files.

    If you're really concerned about it, you can change it with

    chmod -R 700 /home/fedid


    fedid is your login name,
    700 – if you do not want other people to see your files

  • Basic Linux - user and group permissions

    Access to files/directories via Linux is set at the user and group level.

    You will have access to your home directory and the directory assigned to your visit in the beamline filesystem e.g.




    You will have access to your home directory as you are defined as the 'Owner'


    [fmx47643@ws342 ~]$ ls -la /home/fmx47643/
    total 2860
    drwxr-xr-x.  71 fmx47643 fmx47643   16384 Jun 13 14:17 .


    You will have access to the experiment directory because you are a member of the group that has access.


    [fmx47643@ws342 ~]$ ls -la /dls/i31/data/2016/ab12345-1
    total 6528
    drwxrws---+ 42 gda2        ab12345-1    16384 Jan 14 23:45 .

    getent group ab12345-1