Skip to content

Customize Shell Environment

The action of customizing the shell environment from the default "bash" setting can in general be performed by running the change_shell command, together with the path to the shell executable present under the /bin system folder.

Change shell to ZSH

Here, we offer a specific example of the command necessary to change the shell from the default "bash" to the "zsh" option.

1
change_shell /bin/zsh

Dot Files

There exist several hidden system configuration files, or "dot-files", within the Login Home, such as the .bashrc and .bash_profile files. Caution is advised when modifying such files, since they can significantly affect the functionality of the shell environment. In case of uncertainty, we recommend the reader to consult relevant documentation manuals on the general Linux environment before implementing any change to these files.

NEVER remove the system content of the ".ssh" folder

We urge the user not to remove the default content of the files in the ".ssh" folder, since doing so can break the operations of the platform for the user.

Install different version of python

It is sometimes necessary to use multiple versions or distributions of python. The routines below demonstrate how to do it. We can also recommend using the pyenv 1 tool, as an alternative.

python

Below is a quick tutorial on how to install python and pip in the userspace. This is helpful when prototyping and trying packages not yet supported system-wide.

  1. Install python to local directory

    1
    2
    3
    4
    5
    6
    mkdir ~/python
    cd ~/python
    wget https://www.python.org/ftp/python/2.7.11/Python-2.7.11.tgz
    tar zxfv Python-2.7.11.tgz
    find ~/python -type d | xargs chmod 0755
    cd Python-2.7.11
    
  2. Compile the source following the official guidelines

    1
    2
    ./configure --prefix=$HOME/python
    make && make install
    

    Notice the prefix option, it is mandatory for this to work. The value of prefix option is to specify where to put the related output of make command, by default it is in the /usr/local/ but we use our home directory instead.

  3. Next, update the environment variables to use our new python. Edit ~/.bashrc_profile and add the following lines:

    1
    2
    export PATH=$HOME/python/Python-2.7.11/:$PATH
    export PYTHONPATH=$HOME/python/Python-2.7.11
    
  4. Refresh the current session by running the command:

    1
    source ~/.bashrc_profile
    

    One might need to logout and login again for the environment to update properly.

  5. At this point, one should be able to see the new python. To check, run this command:

    1
    python --version
    

pip

Pip is a python package manager, as explained in the references here. Below are directives that allow for its installation to be used with the newly installed python above.

  1. After installing python locally, install pip.

    1
    wget --no-check-certificate https://bootstrap.pypa.io/get-pip.py -O - | python - --user
    
  2. After finishing the installation, update PATH variable. Open ~/.bashrc_profile and add the following line:

    1
    export PATH=$HOME/.local/bin:$PATH
    
  3. Reload the session by the command source ~/.bashrc_profile or logout and login again. Then, check if pip command is available:

    1
    which pip
    

It should show a path pointing to your local directory: ~/.local/bin