Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

[Terminal] - Do applications know where to install?

New to Debian (Or Linux in general)? Ask your questions here!
Post Reply
Message
Author
RedPieDad
Posts: 20
Joined: 2017-12-08 08:17

[Terminal] - Do applications know where to install?

#1 Post by RedPieDad »

I used the:

Code: Select all

apt-get install sudo
to install "sudo". And I used

Code: Select all

apt-get install synaptic
to install "synaptic package manager". Do these packages automatically know the "correct/optimal" directory to install at with the "apt-get" command? And lets say I wanted to change the directory of the installation, what command(s) at installation would I use to alter it's configured folder path?

User avatar
Ardouos
Posts: 1075
Joined: 2013-11-03 00:30
Location: Elicoor II
Has thanked: 1 time
Been thanked: 4 times

Re: [Terminal] - Do applications know where to install?

#2 Post by Ardouos »

RedPieDad wrote:I used the:

Code: Select all

apt-get install sudo
to install "sudo". And I used

Code: Select all

apt-get install synaptic
to install "synaptic package manager". Do these packages automatically know the "correct/optimal" directory to install at with the "apt-get" command?
Yes.

It is dpkg that unpacks the package. whether you decide use the command line tool or Synaptic is personal preference.
RedPieDad wrote:And lets say I wanted to change the directory of the installation, what command(s) at installation would I use to alter it's configured folder path?
You can change the directory where the file is installed through dpkg. AFAIK you can only change dpkg's root directory where it installs software.

from its man page:
--instdir=dir
Change default installation directory which refers to the directory where packages are to be installed. instdir is also the directory passed to chroot(2) before running package's installation scripts, which means that the scripts see instdir as a root directory. (Defaults to /)
It is not something I would recommend though. Unless you know what you are doing.

https://linux.die.net/man/1/dpkg
Also: https://www.linuxquestions.org/question ... ry-552180/
There is only one Debian | Do not break Debian | Stability and Debian | Backports

⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org
⠈⠳⣄⠀

User avatar
michapma
Posts: 544
Joined: 2008-05-04 20:49
Location: Prague

Re: [Terminal] - Do applications know where to install?

#3 Post by michapma »

RedPieDad wrote:And lets say I wanted to change the directory of the installation, what command(s) at installation would I use to alter it's configured folder path?
Instead of asking how to do this, tell us what it is you really want to do. In other words, what do you hope to achieve by this? For instance, do you need to manage space on different partitions? If so, there are better ways to do it.

User avatar
debiman
Posts: 3063
Joined: 2013-03-12 07:18

Re: [Terminal] - Do applications know where to install?

#4 Post by debiman »

also don't forget to run

Code: Select all

apt-get update
and preferably also

Code: Select all

apt-get upgrade
BEFORE installing things.

steve_v
df -h | grep > 20TiB
df -h | grep > 20TiB
Posts: 1400
Joined: 2012-10-06 05:31
Location: /dev/chair
Has thanked: 79 times
Been thanked: 175 times

Re: [Terminal] - Do applications know where to install?

#5 Post by steve_v »

RedPieDad wrote:Do these packages automatically know the "correct/optimal" directory to install at with the "apt-get" command?
All package installation tools call dpkg, and dpkg installs files in the appropriate system directories automatically based on the directory structure in the package itself.
RedPieDad wrote:And lets say I wanted to change the directory of the installation, what command(s) at installation would I use to alter it's configured folder path?
Firstly, you don't. There's no reason to do this unless you are installing software manually from a non-debian package - in which case you specify the installation path when compiling the software.
Putting a package or application in it's own directory is a Windoze thing. In Debian (or any Linux/Unix based OS) files are located by what they do, not what application they belong to - binaries go in /usr/bin, libraries go in /usr/lib, other stuff goes in /usr/share, etc.
Changing this would require rebuilding all the packages you want to move. That's a lot of buggering about for zero benefit. Why would you want to do this?
Once is happenstance. Twice is coincidence. Three times is enemy action. Four times is Official GNOME Policy.

Post Reply