You are not logged in.

#1 2021-10-26 09:56:45

Valso
Member
Registered: 2021-04-22
Posts: 136

Changing the install location of a program?

After 20 years of using Windows (and now 6th year with Linux), I wonder is it possible to change the install location of a program? By default programs' executables usually go to /usr/bin, libraries somewhere else and the configs go to a third location. But that's a little cofusing, so I wonder is it possible to have a program installed in the same directory, just like on Windows? As you know, on Windows the default location is Program Files with one directory where the program goes and all the files are there - executables, DLLs, sometimes even config files. So I'm curious if such a thing is possible with Linux (Arch included) and if yes - how?


RESIST OS GTK3 (customized Arch without pipewire), i7-12700F, RTX 3070 Ti 8GB, 64GB DDR5-4800 (OCed to 5200 MHz).

Offline

#2 2021-10-26 10:14:56

dogknowsnx
Guest

Re: Changing the install location of a program?

You're basically talking about 'snaps' : https://wiki.archlinux.org/title/Snap
Personally I'm not using snaps and wouldn't recommend it.

EDIT: Almost 'everything' is possible on Linux, but why would you want to change a programs's file locations? That would be a mess and possibly render your system unusable.

Last edited by dogknowsnx (2021-10-26 10:19:33)

#3 2021-10-26 10:30:16

sabroad
Member
Registered: 2015-05-24
Posts: 242

Re: Changing the install location of a program?

Valso wrote:

on Windows the default location is Program Files with one directory where the program goes and all the files

Windows doesn't have a package manager (eg. pacman), and so applications install themselves to Program Files.

In Linux, for the installation of add-on (eg. tarballs, ie. not package manager) application software packages the Filesystem Hierarchy Standard reserves /opt, which makes this somewhat equivalent. Getting rid of package manager installed applications is a bit of a step back though.

Last edited by sabroad (2021-10-26 10:32:00)


--
saint_abroad

Offline

#4 2021-10-26 10:32:38

Raynman
Member
Registered: 2011-10-22
Posts: 1,539

Re: Changing the install location of a program?

Offline

#5 2021-10-26 13:00:32

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,243

Re: Changing the install location of a program?

Why is your plan to introduce the https://en.wikipedia.org/wiki/DLL_Hell into a sane OS design?

This rubbish only exist on windows because

sabroad wrote:

Windows doesn't have a package manager

There're efforts to bless distros with this mess, but

dogknowsnx wrote:

Personally I'm not using snaps and wouldn't recommend it.

Offline

#6 2021-10-26 13:55:21

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,497
Website

Re: Changing the install location of a program?

Why would shared libraries go in a private location?  That would completely defeat the purpose.

As mentioned there are distros that try to force this on linux, but most of them are so horrifically and stupidly done it's laughable.  If you want all program files to be unshared and in a single location, you want static linking.

There are statically linked distros.  And this certainly has it's pros and cons, but it is not an unreasonable approach.  But accepting the costs of shared libraries without actually sharing them (and therefore failing to reap any of the benefits of shared libs) is just stupid.  Share libs, or statically link: don't accept the worst of both options with the benefits of neither.

EDIT: for reference, I find the merits of fully statically linked systems quite appealing, but I am not aware of any well maintained distros that implement it well.

Last edited by Trilby (2021-10-26 13:57:51)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

Board footer

Powered by FluxBB