LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Installing via SU Root vs Running via SU Root? Help Please :( (https://www.linuxquestions.org/questions/linux-newbie-8/installing-via-su-root-vs-running-via-su-root-help-please-4175732935/)

HaroldHamer 01-19-2024 03:03 AM

Installing via SU Root vs Running via SU Root? Help Please :(
 
Complete linux noob.Running debian and so far, absolutely love it, but scared because I don't understand much yet.

I'm trying to install wine on Debian so I may install Photoshop.

When I am using terminal, the installation process will not work unless I use SU ROOT and then proceed, i have used SU root to install all programs on Debian. (tell me if this is wrong/stupid) as otherwise it prompts for a password which doesn't work.

Part of the installation process that follows then says "running wine with sudo is highly discouraged". Am I doing something wrong? My understanding is that you need to use SU ROOT to install, but I am guessing there's a difference between using it to install and running a program?


Help would be awesome! Thanks

michaelk 01-19-2024 05:58 AM

Quote:

running wine with sudo is highly discouraged
su and sudo are different commands.

The debian installer does not enable sudo by default.

su (switch user) allows you to run commands with another user's privileges in a shell, by default the root user. su requires you to know the password of that user.

sudo (superuser do) allows you to run commands without switching users using root's privileges. sudo usually only requires that user's password. You can also configure sudo to only allow certain commands to be run by a regular user.

When sudo is enabled, to run commands as root:
sudo apt install whatever (you will be prompted for your password)

michaelsavage 01-19-2024 10:26 AM

A different way to resolve this would be to use Gimp. Photoshop works well on a Windows based OS, while Gimp works well on a Linux based OS.

TB0ne 01-19-2024 10:31 AM

Quote:

Originally Posted by michaelsavage (Post 6477888)
A different way to resolve this would be to use Gimp. Photoshop works well on a Windows based OS, while Gimp works well on a Linux based OS.

GIMP runs on Windows and Mac as well. And between GIMP and Darktable, I'd be hard pressed to find a real reason to use Photoshop especially through WINE.

OP, if you need Windows programs you really just need to use Windows. Dual-booting is an option, as well as loading Windows in a virtual machine.

pan64 01-19-2024 10:36 AM

yes, root is used to manage the host, but not to use it. So you install apps, configure it as root, but run those apps as yourself (regular user).
And also, would be nice to use linux software on linux (so instead of photoshop something written for linux).
Using linux + wine + windows software is possible, but inefficient and not really suggested if there is another way

hazel 01-19-2024 11:12 AM

In Linux the "principle of least privilege" is very important . This means that you do not ever give yourself privileges or powers unless you actually need to use them at that particular moment. And you drop those privileges again as soon as you have done whatever it was that you needed them for. This ensures that you cannot accidentally damage your system, which in turn allows you to explore the system safely. So, for example, you need root powers to update your system, but you should not normally log in as root. If you do, sooner or later you will forget that you are root and do something silly. Become root (by using either su or sudo), do the update, then go back to being your unprivileged self.

Another good rule in Linux is to try to avoid using Windows programs in wine. Find out what the equivalent Linux program is and use that natively. It will run much faster. So do image creation and processing with the gimp, word processing with libreoffice write, read pdfs with evince or some other native document viewer. Wine is for those rare occasions when only the Windows program will do the job.


All times are GMT -5. The time now is 10:57 AM.