0

New Ubuntu 16.04.3 user. I know basic stuff and "study" all the time. Only me using this pc and desktop as user. I've tried to download React+associated programs like java etc. I do get at some point, but eventually something goes wrong because i'm not "allowed" to run programs in Terminal.

So, I've tried using

sudo

to run everything but it eventually crashes and errors at some point. And all of the other ways I could find on the internet. With

root -i

account I manage to download everything without errors, but then I can't find my downloads in the files.

When I try to get superuser acc. with info found on the internet using:

su - username

which should update my account to superuser # I still get ~$ Is it possible that I've messed something up from the start? I installed Ubuntu with USB flash drive as main desktop and didn't have any problems.

Zanna
  • 70,465
  • "it eventually crashes and errors at some point" -- show us the error messages. – glenn jackman Nov 21 '17 at 21:26
  • 3
    Hello! Please tell us what you actually want to do. I think you are trying to install an application. We can probably help you with that, but right now your question is quite confusing. – Zanna Nov 21 '17 at 21:26
  • 1
    If you want to install, first of all have a look at the Ubuntu Software Centre. Secondly, most "Ubuntu compatible" software often is with a .deb file [on the softwares' download page] which will [usually] allow you you to use the Software Centre to install. As said above, what do you want to install ? – Piloti Nov 21 '17 at 21:32

1 Answers1

4

My shot in the dark is based on this sentence: So, I've tried using sudo to run everything but it eventually crashes and errors at some point.

If you really do run everything by sudo probably the ownership to some files and folder in your user's home directory is changed to root:root, that causes a lot of errors. To check this, execute the following command and read the third and the fourth column (press q to exit):

ls -laR ~ | less

To recover from this situation execute:

sudo chown -R $USER:USER $HOME

This command will change recursively the ownership of /home/<user> to your user and :group.


The command sudo allows a permitted user to execute a command as the superuser (root). So you should be really careful when you using this command. The rule number one [read here]: don't use sudo with any graphical applications. It probably will cause the situation described above. If you have done this, maybe your downloaded files are located in /root/Downloads.

By the login option sudo -i you will be able to become root via your own credentials - username and password - if you are a permitted user. But to become root by the command su (switch user as I call it :) the root's account must be enabled, that is not recommended.


To install software packages on first place (as @Piloti suggested) use Ubuntu Software Center, find the application and click on the Install button. It will ask you for your password and if you are a permitted user, able to execute commands as root, the package will be installed.

If you already have downloaded any .deb package you could install it by double click on it and open with Ubuntu Software Center. You could install a .deb package also via the command line by the command dpkg -i. You should execute this command as root:

sudo dpkg -i <package name>.deb

You could install software packages via the command line directly from Ubuntu repositories by the command apt, that should be executed as root too. For example if you want to install Chromium browser execute the following command:

$ sudo apt install chromium-browser
[sudo] password for <user-name>: type your user's password here
pa4080
  • 29,831