Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This 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!


  Search this Thread
Old 11-16-2013, 03:13 AM   #1
Registered: Mar 2005
Distribution: Ubuntu 12.04 LTS
Posts: 249

Rep: Reputation: 16
Where on file system to place command-line tools from GitHub?

Where on the file system do you place command-line tools that you install manually (but that require no compilation) from places like GitHub? For example, things like and

I've just been putting them in my home directory then updating PATH env variable manually to include the subdirectory containing the executables, for each of those projects. What's a cleaner way to do this? Is there a location outside of /home where I could be placing these?

I put things in /usr/local/sbin but those are just standalone scripts, not whole directories. And sbin is for administrative things and the kinds of tools I'm talking about aren't really for administration. There's also /opt, but that seems to be the location where tools that were installed by .deb packages put themselves (e.g. Vagrant).

What are some options I have for where to put these things?

And is there any way around having to manually update PATH to include each of these tools separately?
Old 11-16-2013, 04:38 AM   #2
Senior Member
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,706

Rep: Reputation: 1270Reputation: 1270Reputation: 1270Reputation: 1270Reputation: 1270Reputation: 1270Reputation: 1270Reputation: 1270Reputation: 1270
The usual place is /usr/local.

The contents of /usr/local is usually a etc, bin, lib,... as a mirror of the systems construct.

Personally, I have extended it slightly by putting a package_name.version in /usr/local which allows me to put multiple versions, then (as admin) I can create a symbolic link package_name to point to whichever is the current version. In bin I create symbolic links to the executables by with the structure "binname ../package_name/bin/executable", so that if I switch versions, everything gets switched. The same goes for the /usr/local/lib.

Sometimes calls for a bit of cleanup in the /usr/local/bin as executable names are dropped or changed, but it does allow me to keep an older version around (just in case), the current version, and a new test version. Though to use the new/old version I have to put its entry in my path before
putting /usr/local/bin.

The advantage of keeping these packages separated from the system is to avoid potential collisions... and allows a separate backup to be made easily. When I was at work, we kept the /usr/local directory on a separate partition, so that even if the OS is completely replaced, the
/usr/local filesystem could just be mounted normally, and all those packages would not have to be reinstalled.
1 members found this post helpful.
Old 03-05-2014, 01:17 AM   #3
Registered: Oct 2007
Distribution: Slackware
Posts: 825

Rep: Reputation: 163Reputation: 163
For simple stuff like youtube-dl I am quite happy using $HOME/bin.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
command line -> Network Tools devilboy09 Linux - Networking 2 04-05-2012 04:46 AM
[SOLVED] How do I use command line tools? Advice Pro Linux - Software 2 06-23-2011 08:50 AM
must have command line tools. slimm609 Slackware 28 05-29-2007 06:45 AM
C++ Interfacing with command line tools khermans Programming 2 04-14-2005 02:00 PM
group command line tools m2azer Linux - General 4 10-31-2004 09:37 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:42 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration