Installing in /opt needs permission should i sudo it?


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

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:

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:

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:

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.

Have you considered using a community package? Three people have packaged Netbeans for Leap-15.0 :–

You will still need to supply the root password to install software on your machine.

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.