Where should I place a download tarball? [closed] - linux

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
I downloaded ChromePlus tarball and extracted it to my home directory. The extracted folder contains an executable that I can double-click to launch ChromePlus. So I assume I do not need to any extra things to install it.
I'm new to Linux. Where should I place ChromePlus directory? It's currently sitting on my home directory and it does not look neat. After googling, I thought about /bin/, /usr/bin, /usr/lib. Where is the best place?

I usually do so. I put the extracted directory to /usr/local and make a link to the binary in /usr/local/bin, so it looks something like:
/usr/local/bin/theapp -> /usr/local/Theapp/bin/theapp
If I care about upgrading Theapp and the extracted directory contains version then I also symlink "Theapp" to point to current version of it, e. g.:
/usr/local/Theapp -> /usr/local/Theapp-1.0.0

Since /usr/local may not be writable on some systems that you have access to, one's home directory is often the only place. For things like compiling the Linux kernel source code, using /usr/src, a path outside a home dir, is even discouraged.

Related

Symbolic Link Edits and differences to hard link [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 4 years ago.
Improve this question
I just created a symlink to a directory using:
ln -s /path/to/real/ link
1 - If I then cd into link/ will any changes I make in there be reflected in the original directory?
2 - Additionally, the source directory is a git repo, so can I do the git commands from the symlink'ed directory?
3 - These answers and any general explanation about the differences between sym/hard links (or ln in general) would rock.
Thank you!
Symbolic links work just like another name for the original directory. They are different from hard links because if you replace the original file with a new one of the same name, the symbolic link points to the new file. A hard link would still be linked to the original file, no matter what name it had.
A symbolic link can "dangle" which means that it's target is no longer there. A hard link cannot.
A directory cannot be hard-linked. In the past that was allowed but it creates the possibility of directory loops, and this is a bad thing.
Yes if you cd symlink you can do anything that you want, just as if you were in the actual directory, because you are in the actual directory. Your shell, depending on its configuration settings, will allow you to think you're in the symlink named directory, but all of the operating system functions will return the actual directory names.
When you do cd link/, your current directory becomes /path/to/real and any changes you make in the directory are in 'the real directory'.
Beware of cd -L vs cd -P — see POSIX on cd — and similarly with pwd.

Where shall I put my util shell scripts in linux [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 9 years ago.
Improve this question
I have read the Linux FHS, but still feel a little confuse. If I have some utility shell scripts, shall I put them in /usr/bin or /usr/local/bin or ~/bin?
The FHS says the most user commands goes to /usr/bin, but it also says that administrater should install unpackaged app or host specific stuff in /usr/local, does that means the /usr/local/bin is a better place for my own scripts? Maybe ~/bin is better? I want to know the best way / conventions to do this. Thanks
First of all, I wouldn't put anything unpackaged inside /usr/bin, there's already way too much mess in there without adding unpackaged stuff. Leave it to the package manager.
Now, if they are system-wide scripts, I would put them into /usr/local/bin, which is usually way less crowded, is accessible to everyone and editable only by root; if, instead, they are just for your user, you should put them into ~/bin.

In a Unixy filesystem, where is the conventional place to put software you're working on? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
This is an incredibly dumb question, but I don't know the answer. Apologies in advance.
I want to download a repo of someone else's code from GitHub to work on it. In a Unix-y filesystem, where is the most conventional place to put it?
I've been reading about standard directory structure on Wikipedia and it looks like below opt might be the most appropriate place. Is that correct?
I'm using MacOS, so the alternative would be for me to create a custom folder under /Users/me, but I wondered if there was a conventional place for working on code within the standard Unix directories.
It depends on your usage plans. If this is code you want to hack on, typically your home directory is the right place, since this is private to your unix user. I personally make a 'dev' subdirectory and put code in there (mine or other people's, via github).
If you're looking to install this software system-wide, the answer varies slightly by the system. /opt is a reasonable choice in most cases, as is /usr/local.

Behaviour of soft links pointing to each other in unix filesystem? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
When I made two soft links in a directory pointing to each other
eg.
abc->xyz and xyz->abc
I was not able to open that directory graphically in ubuntu.
When I clicked that dierctory it instantly opened and that gets closed immediately.
what may be the reason for that and how can it be sorted except deleting those soft links?
You probably mean circular symbolic links (or symlinks). What would you expect? Any open(2) (or others) syscall would fail with errno set to
ELOOP Too many symbolic links encountered while traversing the path.
You should remove one of the links, with the unlink(2) syscall, e.g. called by the rm command; so you could open a terminal, cd to the directory containing that mess, then
rm -v abc xyz

What are circular symlinks in Unix-like systems used for? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I was browsing a directory on a Linux machine, and when doing a detailed listing I noticed that a link is pointing to itself, for example:
somelink -> /path/to/directory/somelink
I am wondering what is the reason for doing such a thing?
If the somelink is in /path/to/directory then this is an invalid symlink. If you try to access it, the filesystem will give you an error (probably something like too many levels of symbolic links*). It could have been a typo (or some other mistake) when it was created, or the symlink got moved somehow and ended up linking to itself.
There's no good reason for a circular symlink. Most probably, it was created by accident.

Resources