Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
When I install a package from the terminal, where does it go? I would like to be able to move packages that I install to a directory that I create. That way, I'll be more organized.
Also, is there a way to tell Linux where to install the packages?
When I install a package from the terminal, where does it go? I would like to be able to move packages that I install to a directory that I create. That way, I'll be more organized.
Also, is there a way to tell Linux where to install the packages?
Thanks,
flatapple
That's like asking "how high is up?".....the packages will get installed, wherever they NEED to be installed, based on how the package is built. If the writer decided to install everything under /usr/local/bin, that's where they'll go. Others may be /usr/bin, /sbin, or wherever.
If you build things from source, rather than install from packages, you can tell it where to install. Otherwise, you're stuck with what the package wants, but I'd recommend against it. Packages often need libraries, paths, etc., to work right...if you move them, you could very easily have hard-to-fix problems.
When I install a package from the terminal, where does it go?
From the terminal isn't a very good clue as it depends on where the package came from.
If the package came from a repo of the distro you're running, it went to wherever the dev had it set up to install and parts could be in several folders, in several locations and probably is.
If the package came from an outside source other than a repo from your distro, it's probably in /usr/local,,, but then again parts can and probably are in several folders in several locations throughout usr as well as newly created folders.
Quote:
I would like to be able to move packages that I install to a directory that I create. That way, I'll be more organized.
You can do that but you're kind of doing it backwards.
Create the folder first and then direct the installation to install to that folder.
I would take the time to learn how to do symlinks first however as there is the possibility you may need them.
No offense but you're recreating the wheel, which isn't necessarily a bad thing since essentially, that's how linux got started.
Quote:
Also, is there a way to tell Linux where to install the packages?
Yes.
Each installation method has it's own way of doing that.
There should be readme's as well as the man command for figuring out how.
Personal opinion here, but it might be wiser to just leave well enough alone.
The majority of what you as a user add onto your system will go in /usr,,, which is the lazy way of spelling user.
/usr is always a good place to start looking followed by /usr/local or /usr/bin.
the /bin's are short for binary and linux-speak in a way for .exe.
To learn how to move files to an "organized" folder or how to set up links requires you learn how things were supposed to be set up to begin with.
That kind of defeats the purpose to an extent of creating a special folder so everything can be found easily,,, which will probably become a mirror of what you already have or something that may resemble havoc.
A useful tip here:
Some packages don't require "installing".
Frostwire is a good case in point.
One can download the tar.gz, untar it and drop the folder anywhere in your /home folder.
You can then link to the run.sh in your start menu.
There are two of them so click on each one to see which will launch FW for you.
There is even an icon to make your start menu all purty and everything plus you can then if you so desire create a shortcut on your desktop.
There are several other apps just like this and experimenting before trying to install can save some headaches.
Last edited by windtalker10; 08-29-2009 at 12:18 PM.
Note of caution: don't randomly delete things in /usr/bin, /usr/sbin, /bin, /sbin. Debian's package management uses those directories, and random destructive behaviour will foobar your system.
Okay, the first thing I suggest is that you get your hands dirty and read. If you want to get anywhere within the non-Windows/Mac world, you have to read...a lot. There is a lot of info available in the Linux distro world, and some of it is even accurate.
Your post leaves me some questions in return. One, when you refer to "packages", are you talking about .deb files? Two, by packages do you mean programs which you have compiled yourself? If you are refering to debian packages (.deb files), then you might carefully read this.
While this will likely appear intimidating at first, it is SO worth your time to familiarise yourself with both Unix in general and your OS in particular. Refusing to invest the time will cripple your experience and leave your experience anemic and frustrating. That said...
The wonder and power of Debian is its organisation. Whether you use Apt, Aptitude, or a GUI like Synaptic (and you should choose one and use it primarily, for logging reasons...have I mentioned reading yet?), you have available ~20,000 different packages (programs, etc.) all available online with dependency handling. There is seldom a need to compile programs etc. by hand, although it certainly does happen.
Of course, I haven't answered your questions. Reply to me with answers to my return questions, and I'll narrow things down if possible. (Are you compiling software by hand? Are you installing .deb files?)
I think you'll this educational http://en.wikipedia.org/wiki/Filesys...archy_Standard.
In short, if you're using the pkg mgr of your distro, leave well alone.
If you're building/compiling by hand from eg a tarball, I usually create a sub-dir in /opt.
As mentioned above, those installs usually come with a readme that tells you if you can specify a destination/prefix and how to do it.
Reading is useful and ofaring's links give a lot of good infrmation.
To answer your first question directly, on ubuntu (Debian is probably the same) they go in /var/cache/apt/archives/. If you want to keep all the .deb files (in case you want to re-install without having to download again, except if there are newer versions) you need to copy them from there because it is only a cache and old ones are removed; the oldest ones on my system are only a month-and-a-half old.
Distribution: Ubuntu Linux 16.04, Debian 10, LineageOS 14.1
Posts: 1,572
Rep:
Quote:
Originally Posted by flatapple
Hi,
I would like to be able to move packages that I install to a directory that I create. That way, I'll be more organized.
Synaptic already keeps track of which packages have been installed. So, if you install a package via "apt-get install package", then, when you open synaptic, simply press the Reload button, and then, across the top of the package listings, where you see
Code:
S | | Package | Installed Version | Latest Version | Description
hit the "S"*, and you will sort the package listings via which ones you have installed, and which ones you have not installed.
Aptitude also has a way of listing installed, and not installed packages, separately (I'm assuming you're using apt-get/synaptic, however).
_________
*or, if there's no "S" there, then hit the empty title space above the column of boxes that indicate if a package is installed or not.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.