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.
Hi, Just a few simple questions related to application installations...
What does it mean to have a dot-slash (./) before a command. For e.g., after I installed firefox, i got into the directory, and typing "firefox" didn't work, but "./firefox" did. Why? What does the dot-slash mean?
How do u add a add a directory to PATH? (i.e., which file should I modify so that I can run firefox from anywhere, not just from within the firefox directory)
Finally, where do you guys normally install applications to?
Run 'echo $PATH' to see the PATH. As a regular user, '.' usually will be in the list ('.' == current directory). As root user, '.' is not in the list so you won't be tricked into running a malicious program as root. Thus as root you must type './firefox' to explicitly indicate you want to run something in the current directory.
To set the PATH (to /opt/firefox/bin for example), you run ' set PATH=$PATH:/opt/firefox/bin '. This sets the PATH to what it was before plus the new directory.
The firefox binary is unusual, the usual way of installing is by using your distro's package management system (depends on which linux you have) or by compiling from source.
;i just installed firefox on a linux box for the first time yesterday, and completely filled my /home dir with its files by accident.
;on windows, the installation routine (which i have run tens of times) presents the "standard/custom" options before the option to customize the path that the program is going to install to. on linux, this was not the case, and i completely missed the directory location and the bottom of the "standard/custom" dialog.
;is there any way to move the firefox install files to another location, or must i uninstall and reinstall?
Originally posted by aaa Run 'echo $PATH' to see the PATH. As a regular user, '.' usually will be in the list ('.' == current directory). As root user, '.' is not in the list so you won't be tricked into running a malicious program as root. Thus as root you must type './firefox' to explicitly indicate you want to run something in the current directory.
icic... that certainly explains it... thanks! but even as normal user, i had to type "./firefox", so i guess i have to add . to the PATH?
Quote:
To set the PATH (to /opt/firefox/bin for example), you run ' set PATH=$PATH:/opt/firefox/bin '. This sets the PATH to what it was before plus the new directory.
if i installed firefox in /etc/mozilla-firefox, then i should "set PATH=$PATH:/etc/mozilla-firefox" right?
Will this be permanent? As in, if I do this, will this PATH be set the next time i boot up?
Quote:
The firefox binary is unusual, the usual way of installing is by using your distro's package management system (depends on which linux you have) or by compiling from source.
hmm... i'm using debian, but the installation was pretty straightforward... just had to untar, and then run firefox-installer, and a window comes up prompting for installation path and all that...
The command will need to be run every time the the computer starts up. One place to put it is in /etc/profile, this is where the rest of the stuff like '/bin' get set.
I did an alternative instead... i realised that many applications can be run anywhere even though their directory weren't set in PATH, so i looked around and found that they had a link in /usr/bin, which is in PATH.
So i did the same, creating a link to firefox, i.e.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.