Find installation directory linux

Where is installed software stored in Linux? [duplicate]

I’m new to Linux and I want to ask a bit more about packages. In Windows, I download an .exe file and install it. When I install, I define the path where I want that application to be stored. In that folder, I have all the files required for the application. However, when I install a package in Linux using yum or apt-get , I don’t know where the package is installed to and where the required files for that application are stored. I have seen that most of the configurations are in the /etc directory. But why does Linux store the required files for an application in different directories? Can someone tell me how packages are installed, and where and how are they stored? And if my understanding about package management is wrong, please correct me.

If your distribution uses rpm , you can use rpm -q —whatprovides to find the package name for a particular file and then rpm -q -a to find out what files a package installed.

8 Answers 8

Many programs (the binaries/scripts) end up in /bin or /usr/bin with other parts in various configuration directories (often in/under etc ) as you already noted.

For any specific command you can checkout whereis

and it will give you some information about where this command is to be found. You can also try which

@KOU I don’t know the history of this, but it could be so that programs could be updated without messing up the configuration information since it would be in a different directory. This way different versions could use the same config information (assuming the format etc was not changed ie was compatible). I am just surmising here. You’d have to research the history of the Unix/Linux file system for a definite answer.

I’m not sure of the history of the decision to put all system-wide config files in /etc/ , but having one central location for config files makes it very easy to back them up. (Imagine backup up system-wide config files in Windows, where they’re scattered all through the filesystem and registry. )

You can get a list of the files that a given yum package installs by doing:

Then you can run it like so:

(Obviously, replace «yum-utils» in that second one with the name of that package whose file list you’d like to see.)

Under Windows, particularly older versions, it was common for programs to store configuration files and non-constant data in their C:\Program Files directory. This is derived from how programs were usually installed and ran under single-user, non-networked, non-file-permission DOS.

From a security standpoint, this is a bad idea. Places where executable code lives should be separated from modifiable data. That way it’s easier to apply appropriate file permissions to prevent modification of installed binaries by unauthorized users. Similarly library directories which may be updated separately from main executables should also be in a separate directory.

Читайте также:  Linux find file that starts with

With the advent of Vista and UAC annoyances, this tradition is finally starting to seriously lose traction.

UNIX, and Linux, being a multiuser system from much earlier on, had the tendency to separate executable directories from other directories much earlier, since there was a need to prevent users other than root from modifying installed binaries. It’s also why /usr and even /sbin are sometimes separate partitions — a particularly security conscious admin can mount those partitions readonly and remount them read/write when an install/uninstall needs to happen.

Packages are usually installed from a package manager. There’s various package managers, such as aptitude (Debian and derived distributions), yum (Redhat and derived distributions), pacman (forget which distro this is. ), and others.

The package manager lets you browse repositories, download, install, query, and remove software, much like a sophisticated (and free) «app store.» It assumes responsibility for ensuring dependencies are taken care of and tracking what is currently installed.

Usually the package manager will also allow the same operations on a package you downloaded manually outside of any repositories. Tools are also available if you want to create your own from software you made or compiled yourself.

Since the package itself is NOT an executable file, you don’t have to run an untrusted executable which you don’t really know what it does. (Windows is finally coming around with updates by distributing .msu ‘s instead of .exe ‘s — but .msi ‘s have been around a while. )

Источник

Find installation path in linux

but I usually prefer following and to find from which path program is using, I use Solution 2: If you’re using , install program and you can list the contents of the package: This will show all the files that will be installed by a package, binaries, configuration files, systemd startup files, etc. Steps: Expand your install project in the Solution Explorer so you see the 1,2,3,4,5,6 sections Expand ‘2’ and double click on ‘Files’ You will see a four panel page: with ‘Source computer’s files’ and ‘Destination computer’s files’ delete your hard coded paths and files from the ‘Destination computer’s files’ Click in the top left panel, on the project that has your files as ‘Content Files’ the top right panel will show ‘Content Files from MyProject’ click and drag this to the bottom right panel (the ‘Destination computer’s files’) Go back into your project and make sure all your files you want copied have properties:

Find installation path in linux

services are automatically installed. How to find exact path where any service is installed and their configuration files??

There are quite a few ways to find this but I usually prefer following

and to find from which path program is using, I use

If you’re using apt-get , install apt-file program and you can list the contents of the package:

sudo apt-file update apt-file list package_name 

This will show all the files that will be installed by a package, binaries, configuration files, systemd startup files, etc.

If you use yum , install yum-utils and use repoquery :

Читайте также:  Install dkms package on linux

Suppose service name is nginx then you can find it in /etc/nginx/ on ubuntu .

How To Install WordPress using the Brand New, Siteground upgraded the CPanel to their new Site Tools interface. In this video I show you how install WordPress in the new interface of Siteground so you ca

How To Install WordPress using the Brand New

Siteground upgraded the CPanel to their new Site Tools interface. In this video I show you how install WordPress in the new interface of Siteground so you ca

How to install WordPress on Subdomain on Siteground

Installation Directory Is Not Empty Please Install To An

fix Installation Directory Is Not Empty Please Install To An Empty Location wordpress installtion error . and fix destination folder exist error …

Pass installation path to installer

Which Setup builder can create a Setup.exe that accepts installation path in command line parameters?

I need to create an installer that run silently and accept installation path in command line parameters.

If you want something easier to learn you can try Advanced Installer, it comes with a free edition that can create «Simple» project type, with an MSI as output, to which the above command line can be applied. Its GUI based, so you don’t need to script the projects, but it supports command line builds too.

Advanced Installer uses APPDIR property to store/set the installation path for an MSI, so you need this command line:

msiexec /i setup.msi /qn APPDIR=»C:\Program Files\My Company\My App»

Make sure you run this from an elevated, cmd.exe launched with «Run as admin» option, command line if you install the package per-machine, otherwise it will fail.

The windows MSI format has this capability. You can pass in parameters on the command line via msiexec .

msiexec /i installer.msi /qn PARAMETER=foo 

One of those parameters will be the installation path.

You can build an MSI using the free WiX toolkit. WiX is really powerful, but due to it being XML driven, it does have a bit of a steep learning curve (maybe a couple of days before you are fairly competent). If you have access to Visual Studio then that will help a lot.

Install path — Microsoft Community, 1. Type “regedit” in start menu search box or in Run dialog box and hit enter to continue. 2. Navigate to the following registry key: …

How to specify path for cron script on SIteground?

I manage a website on Siteground, and I want to run a cron script (I’m using the browser dashboard). My script is present on the site, seen here in green in the file manager:

File manager view

I defined my cron script as mysite.com/scripts/myscript.py but the notification e-mail from the cron job informs me that /bin/sh: mysite.com/scripts/myscript.py: No such file or directory

How should I define the path to my script?

You have to define the path as below ‘/home/customer/www/mysite.com/public_html/scripts/myscript.py‘

Find, On centos you can check path using commands given by slashRahul. As per my knowledge you can not change installation path while installing by apt-get. Software components are not installed in a single directory, but across many folders like binaries stay in /usr/bin/, /bin, /sbin, Configuration in other directories. –

Читайте также:  Linux char to hex

InstallShield — relative file paths

How can I add a file to an InstallShield component specifying a relative path to the InstallShield project in order to make it easy compiling the project on different machines?

With the free VS Limited Edition of InstallShield, setting custom paths doesn’t look possible. So hacking the ISL file may be necessary having only a few predefined path options available.

Here are the predefined path variables I found in the 2013 Express docs: (Verify in case of typos)

 Predefined Path Variable Value InstallScript Path Variable -------------------------------------------------------------------------------------------------------------- C:\Program Files\  C:\Program Files\Common Files\  C:\Windows\  C:\Windows\System32\  C:\InstallShield 2013 Projects\ \ProjectName  C:\Program Files\InstallShield\2013 C:\Program Files\InstallShield\2013\ .\Redist\Language Independent\i386 C:\Program Files\InstallShield\2013\ .\Redist\Language Independent\ .\i386 Express 

My VS solution includes both an Outlook AddIn and an installshield le setup project. Although InstallShield was including the AddIn generated output and related assemblies, neither the manifest nor vsto files were included. So I needed to specify these separately. This worked for one workstation; however, another workstation sharing the solution had a different source directory structure giving unresolved sources.

The manifest and vsto files were added by InstallShield with absolute paths. A symlink common to all the workstations could have solved the issue, but I decided to hack the ISL files to see if it’s possible to use relative paths realizing the ISL file might require maintenance hacking in the future.

In order to get the common parent directory (i.e., the solution directory in my case,) I specified the following two parent selectors (..\..) in the ISL for special artifacts listed in .

. <ISPROJECTDIR>..\..\MyProject\bin\Release\. 

where HTML entities are used for the surrounding less-than/greater-than symbols of the variable.

I ran a second test (which should have been the first) using the variable instead of . In this test, only one parent selector was necessary:

. <ISPROJECTFOLDER>..\MyProject\bin\Release\. 

So far things seem to be resolving correctly but your relativity may vary.

You can use (see documentation — resurrected from Wayback, Aug 2018) to point all your files relatively to them.
Also see this blog post.

is the macro for the directory containing the Install Shield project.

(Much easier to have the answer on this page. )

  • fixed relative paths for file content to be copied by the Install Shield Limited Edition to the output directory ( Visual Studio 2012 ) Steps:
  • Expand your install project in the Solution Explorer so you see the 1,2,3,4,5,6 sections
  • Expand ‘2’ and double click on ‘Files’ You will see a four panel page: with ‘Source computer’s files’ and ‘Destination computer’s files’
  • delete your hard coded paths and files from the ‘Destination computer’s files’
  • Click in the top left panel, on the project that has your files as ‘Content Files’
  • the top right panel will show ‘Content Files from MyProject’
  • click and drag this to the bottom right panel (the ‘Destination computer’s files’)

Go back into your project and make sure all your files you want copied have properties: Build Action=Content and Copy to output directory=Copy Always

Installation Failed Message Directory is Not Empty, How to fix the installation failed message directory is not empty when you install wordpress in quickinstall or have a new wordpress installation gone …

Источник

Оцените статью
Adblock
detector