Recursive PATH variable? [closed] - linux

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 7 years ago.
Improve this question
This is more of a curiosity question, but I feel it's worth asking.
Frequently when downloading software on Linux, I'm used to using sudo apt-get install [package] or whatever package manager is available, but for some projects like sbt, they don't have a repository (so I can't just type sudo apt-get install sbt and use it out of the box). I have to download the binaries and add them to PATH.
What I like to do is create a directory specific to programs like sbt, specifically ~/Programs. I move the unpacked directory into it, and add it to PATH. However, I'm always a little wary about moving the binary out of the directory it came in, so I don't want to remove it.
Is there such a thing as a recursive PATH variable, so that not only ~/Programs is added but also ~/Programs/sbt, ~/Programs/other_program, etc.? And if not, is it a good idea to make it recursive? I've tinkered with the Linux kernel before as part of a university class, I wonder if it's worth experimenting with.

Add something like this to ~/.bashrc or ~/.bash_profile:
for each in ~/Programs/*
do
PATH+=:"$each"
done

Related

Kali path variables messed up and now SUDO is useless [closed]

Closed. This question is not about programming or software development. 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 days ago.
Improve this question
I was watching this video shorturl.at/loG48 and got to the point 2:20. I was unable to install snap in the end but forgot to put $ behind the PATH in the environment variable setup. Now I can't run sudo without typing export PATH=$PATH:/usr/bin every single time. I just installed kali and I am really scared please help me.
Doing anything now gives me
`Command 'sudo' is available in the following places
/bin/sudo
/usr/bin/sudo
The command could not be located because '/bin:/usr/bin' is not included in the PATH environment variable.
sudo: command not found
`
I just wanted to download snap but I ended up messing my PATH variables.
By following some guides here and there I managed to find this in my /etc/environment PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games even though I don't know what this is supposed to be. Please help fast.

why I can not permanently remove a file from 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 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 7 years ago.
Improve this question
Today,I encounter a very tough problem which cost me nearly 6 hours.
When I remove a file called ha_wan.conf using rm -rf ha_wan.conf command under /etc directory,Success.When I use ls -al command to see the result,The file disappear.
But when I reboot the linux system,same file named ha_wan.conf come back,located under /etc/ directory.
I tried to delete it many many times,It is the same result.
What should I do,I want to permanently remove that file.Thanks.
There's no magic. You removed the file. If you still see it after a reboot, it means one of two things:
(very likely) Some service recreates the files on boot, or periodically. You can probably use standard system tools to find out which package contained that file. (for example dpkg -S ha_wan.conf in debian-like systems)
(unlikely) You're running some interesting system which uses a temporary filesystem in /etc. If you're using a standard desktop distribution, that's improbable. But if it's some kind of router / special device, then it could happen.

How to install linux tools [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 8 years ago.
Improve this question
I am trying to install some library, it asked me to install the following first:
linux-tools-virtual 3.13.0.35.42
linux-tools-lowlatency 3.13.0.35.42
linux-tools-generic-lts-trusty 3.13.0.35.42
linux-tools-generic-lts-saucy 3.13.0.35.42
linux-tools-generic 3.13.0.35.42
You should explicitly select one to install.
E: Package 'linux-tools' has no installation candidate
I am using aws instance as ubuntu user, version 14.
A quick look at apt-cache search linux-tools reveals that even apt-get doesn't know which one you're talking about. There's a lot of those packages that are similarly named.
Be explicit about which one it is you need to install. Since I don't know which one you require for your application, I can't recommend a specific, exact one for you to install that I know will work 100%. But the linux-tools-generic and linux-tools-virtual seem to be promising. Look into those packages and see if they contain the libraries you need.

KDE exibition glitch [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 8 years ago.
Improve this question
My KDE is broken, the desktop Widgets cannot be displayed. And many KDE programs look like this:
All the software written in GTK is all right.
Can any one give me any suggestion about what's happening and which part is broken?
Where can I find error log?
You don't say what disto you're using (please add it to the tags in your question), nor how you got in this state - new installation? dist-upgrade? hard crash? That would be useful information.
But in general, here's what I would try:
Log out and go to a bare terminal with CTRL-ALT-F1, then login and rename your .kde / .kde4 directories: mv ~/.kde ~/.kde.old and reboot or otherwise restart your GUI system.
That will at least tell you whether the problem is messed up personal settings or messed-up system files.
If that doesn't fix the issue (that directory will be recreated when you start up KDE again; all your settings will be lost, but you can recover them - carefully, one by one - from the backup you just made), then I would first try sudo apt-get check (assuming you're on a Debian-based distro).
If that doesn't report any problems, then I would update my system - possibly even do a dist-upgrade without changes any sources.
If this issue still wasn't fixed, I would run sudo dpkg -l > ~/Desktop/dpkg_out.txt to get a list of installed or uninstalled packages and their state in a file, and then look through the file for problems as explained here.
Finally, if all of that failed, I would take a good hard look at my video drivers.
Good luck!

Installed an RPM file. Where to find the installed program? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 9 years ago.
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.
This question does not appear to be about programming within the scope defined in the help center.
Improve this question
I have installed xmedcon-0.11.0-1.i686.rpm on my Fedora Linux machine. I ran the RPM file. Since I'm kind of new to Linux, I want to ask, where can I find the installed file and how can I run it?
Thanks.
From terminal use
$ rpm -ql xmedcon-0.11.0-1.i686 </code>
/etc/xmedconrc
/usr/bin/medcon
/usr/bin/xmedcon
You will see all the files installed. The main files will be above. From command line
run
$ /usr/bin/xmedcon
In case you already know the command name, you can type which medcon in a terminal and it should tell you where the executable is located.
And as full.stack.xchg said, just typing the name of the executable on a command line (or finding it in the graphical menu) will start the program.

Resources