Results 1 to 5 of 5

Thread: Installing in /opt needs permission should i sudo it?

  1. #1
    Join Date
    Jun 2018
    Location
    Greece
    Posts
    7

    Default Installing in /opt needs permission should i sudo it?

    Greetings.

    I am currently trying to install netbeans on my machine.
    After some research i saw that 3rd party software should be installed in /opt but when i change the default directory to it it says it's read only
    Now i'm kind of afraid of sudo since i am new to linux so if there is another way i would appreciate it

  2. #2
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    25,157

    Default Re: Installing in /opt needs permission should i sudo it?

    All software that is installed system wide goes into directories that are owned by root and protected from tinkering with it from other users. /opt is no exception. So yes, when you want to install there something, you have "to be root".

    See also: https://en.opensuse.org/SDB%3ALogin_as_root
    Henk van Velden

  3. #3
    Join Date
    Oct 2014
    Location
    Italy
    Posts
    1,674

    Default Re: Installing in /opt needs permission should i sudo it?

    Hi and welcome to the Forums!
    /opt is owned by root in a default install, so you need superuser permissions to install stuff there. For instance this is what I see on the system I'm writing from:
    Code:
    LT_B:~ # ls -l /opt
    total 12
    drwxr-xr-x 3 root root 4096 Nov 24  2017 VirtualBox
    drwxr-xr-x 7 root root 4096 May  5 00:09 libreoffice6.0
    LT_B:~ #
    I don't know how you are going to install your stuff, but if you are going to use the command line you can open a terminal and type:
    Code:
    su -
    <enter superuser (root) password>
    You shall note that the prompt changes shape (and colour if your terminal shows it) indicating that now you are logged in as root and can do whatever you want, so be careful.
    Otherwise you could use an installer tool like YaST-Software, zypper, rpm if the package you want installed can be managed by those tools.
    Feel free to ask again here if you need detailed instructions.
    Main: Leap 15 Gnome on i7 4720HQ + Geforce GTX960M
    Test: Leap 42.3 (& others) on Core2Duo + GM965

  4. #4
    Join Date
    Oct 2008
    Location
    Glasgow, Scotland
    Posts
    1,134

    Default Re: Installing in /opt needs permission should i sudo it?

    Quote Originally Posted by MrNutbutters View Post
    I am currently trying to install netbeans on my machine.
    After some research ...
    Have you considered using a community package? Three people have packaged Netbeans for Leap-15.0 :--
    https://software.opensuse.org/package/netbeans

    You will still need to supply the root password to install software on your machine.
    ~Thank you for sharing an interesting problem.
    --
    slàinte mhath,
    rayH

  5. #5
    Join Date
    Jun 2018
    Location
    Greece
    Posts
    7

    Default Re: Installing in /opt needs permission should i sudo it?

    Thank you all very much.
    I always go for the suse site first but i could not find the ide.
    I assume that if i have leap 15 as the selected distro it only shows official release packages so i learned a new thing today.
    Still the info from hcvv and OrsoBruno seems valuable and is appreciated.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •