Sudo apt-get install in terminal asking for password

11.7k Views Asked by At

I'm using the AI Platform notebook and I want to install cuda because the Tensorflow can't use GPU.

sudo apt-get install cuda-cudart-10-0

Then in the command line it's asking me for password.

(base) jupyter@cuda-10-1-20201008-115420:~/tutorials/stylegan2$ sudo apt-get install cuda-cudart-10-0

We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:

    #1) Respect the privacy of others.
    #2) Think before you type.
    #3) With great power comes great responsibility.

[sudo] password for jupyter: 
Sorry, try again.

I don't recall I gave it any password while setting it up. Is there a default password for it?

3

There are 3 best solutions below

0
On BEST ANSWER

To answer the first question, our Notebooks provide TensorFlow and when you create it, you can select to install Nvidia Driver automatically. Probably this option was missed during instance creation.

With respect to the second question, from the output, seems to be that you are in Jupyter Terminal. Jupyter Notebooks provides access to Instance OS which could be Debian 9/10 or we support Ubuntu now. Jupyter Terminal process is running as jupyter user. While you can still run process as root. I would suggest you that you login via SSH and run commands directly from there. If you create the Notebook via UI we now provide OS login feature which allows you to access instance via SSH with IAM permissions hence your Google Cloud user account. If you are not sure of any of this, please contact your IT admin.

1
On

Which linux distro are you on? Like Kali has default password as root or toor or kali depending on version

2
On

What do you think sudo does? If this is your first time using a Linux system, know that prepending every command in Linux with sudo is same as typing cmd in the windows run box and then pressing shift+enter. sudo is a way to tell the OS that I need admin rights (or in Linux's case, root permissions). So, it is bound to ask you for the password.

The password it is asking for is your account password. Also, it is usually a good idea to set up the root password when in first use. To set it up, drop into the root prompt from your user account using sudo su. Then type in passwd to set up a new password for the root user. Log out, and restart the machine.

Do not forget that root account has the ultimate privileges, and unless absolutely necessary, it is always better to prepend the command with sudo instead of dropping into the root prompt.

PS: A hint: sudo <command> followed by the caller's password is same as su -c '<command>' followed by the root account's password


You also might want to take a look at fakeroot