Hands-On Networking Thorsten Herfet, Andreas Schmidt, Pablo Gil Pereira

News

LabVM: Default Python for Root User

Written: 21.02.2018 17:00
Modified: 28.02.2018 15:02
Written By: Andreas Schmidt

Dear students,

during U02 we found that inside the LabVM, the root user is using Python 2.7 by default. As one of the projects requires you to run a program with sudo (as a root user) and validate that it works with Python 3.6., we recommend that you run the following command in your VM once:

sudo printf 'alias python=python3.6\nalias python3=python3.6' | sudo tee /root/.bash_aliases

Please make sure that you apply this change so that you don't accidentally submit project code that does not work with Python 3.6.

UPDATE:

We found out that this change is not enough to make "sudo python" use Python 3.6. In order to achieve this, you might add another alias to your HON user. The following line will achieve this if you use the existing LabVM default configuration:

printf '\nalias sudo="sudo "' | tee -a /home/hon/.bash_aliases

Eventually, your file /home/hon/.bash_aliases should look like this:

alias python=python3.6
alias python3=python3.6
alias sudo="sudo "

Regards,
The HON'18 Team



Privacy Policy | Legal Notice
Legal Notice | Online Privacy Policy
If you encounter technical problems, please contact the administrators