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 there is an application i am trying to install in fedora 10 , but i am getting an error saying that command does not exist .
this is the instruction that i am supposed to follow
Add the new directory to your path. If the directory, for example, is /home/tupac/codeploy, on tcsh, you execute the following commands:
setenv PATH /home/tupac/codeploy:$PATH
rehash
however the setenv doesnt seem to exist in the fedora library..so wats the alternative for this .??
or in fedora open the file " .bash_profile " in your home folder and add /home/tupac/codeploy
Code:
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
# --- edited for posting your path maybe different ---
PATH=$PATH:/sbin:/usr/bin:/usr/sbin:/home/tupac/codeploy:$HOME
export PATH
In case that wasn't clear, I think he means "Start a new terminal session," not "Reboot" or "Restart the X-server"
And the tcsh is available in the Fedora repositories. Try a sudo yum install tcsh and then you should be able to use that as your shell instead of bash. You can use the login manager to reset your default shell.
John, the .bash_profile is read when you start a bash shell, and the X-server is not a shell script. In any case the X-server is (usually) a root process so changes to ~/.bash_profile or ~/.bashrc in a user's directory would have no effect on the way the X-server works.
For what the OP want's to do, a local shell ("terminal session") needs to be opened, and that's when the changes to the PATH variable need to be implemented.
If you want system-wide PATH changes, you can add them to /etc/rc.d/rc.local or change /etc/profile. (There has been some "rumbling" amongst the Fedora developers about adding the sbin directories to the user PATH since most of the restricted commands behave appropriately when started by a user without "root" privileges, but that "most" seems to be a "show stopper.")
John, the .bash_profile is read when you start a bash shell, and the X-server is not a shell script. In any case the X-server is (usually) a root process so changes to ~/.bash_profile or ~/.bashrc in a user's directory would have no effect on the way the X-server works.
It all comes down at how do you login. The contents of /etc/profile will be sourced after init comes into scene, and thus, inherited by the rest of the bash sessions regardless of the user.
But if you login on command line then ~/.bash_profile will be sourced since you started a interactive login shell. Hence, when you later do startx and open a given terminal in X these settings will also be inherited. Of course you can also just forget about this, use plain ~/.bashrc and that path will be present in your xterms and such.
It just depends on what exactly do you want to do. Either way, it's a good idea to mark it to be exported so the rest of the programs can see the variable correctly.
Code:
export PATH="$PATH:/whatever/else"
To the original poster, this is a shell thing, not related to Fedora or any other distro. To get a complete list of the different rc files that a given shell uses you should look at its man page. For example, for bash you can find this info in the INVOCATION section of the bash man page.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.