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.
Well that depends on what PATH you want to set. If you know the name of your variable then figure out what shell you are running (ksh, csh, bash... etc). If you don't know that then type 'echo $SHELL' and that should output the default shell that is used (more than likely bash). If it's bash... then you do the following, however, remember to replace PATH with the environment variable you intend on modifying:
export PATH=$PATH:/new/path/added/ <enter>
And that should work... to check type echo $PATH and see if your path has been added.
If you have a csh shell then you can do the following:
setenv PATH=$PATH:/new/path/added/ <enter>
Now these paths won't be permanent... if you want to do this permanently then put these lines your .cshrc or .bashrc files.
Last edited by Corona4456; 07-29-2004 at 03:32 PM.
I've got a similar problem, I can't get the path changes to save, and I don't have a .tschrc file, only .bashrc and .bash_profile. I'm quite sure that I'm running tcsh, cos when I type echo $SHELL, it returns /bin/tcsh.
How can I add path changes to .tschrc if I don't have one?
Originally posted by boydasilva I'm quite sure that I'm running tcsh, cos when I type echo $SHELL, it returns /bin/tcsh.
How can I add path changes to .tschrc if I don't have one?
make one.
emacs ~/.tschrc
or change to bash
edit /etc/passwd
make for your username like
username:x:<number>:<number>::/home/username:/bin/bash
Quote:
I mean how do you add a path (like for your PATH environment, its export PATH= $PATH/dir/).
better to add the lib path to /etc/ld.so.conf
and as root run ldconfig
that to set the lib path variable
LD_LIBRARY_PATH
for runtime lib path
is usefull but an older and slower way of doing it
ld.so.conf is compiled and cached (faster and smarter)
developers use LD_LIBRARY_PATH mostly for temporary changes for testing
Last edited by foo_bar_foo; 11-23-2004 at 03:03 PM.
I don't seem to be able to make this work. I've made a .tcshrc file, which looks a bit like this:
################################################################
# .tcshrc
# User specific aliases and functions
alias rm 'rm -i'
alias cp 'cp -i'
alias mv 'mv -i'
# Source global definitions
if [ -f /etc/tcshrc ]; then
. /etc/tcshrc
fi
What's wrong with my if statement? Have I missed something out?
Also, I need to add these statements to the .tcshrc in order to get a program to run:
setenv LD_LIBRARY_PATH $HOME/EMAN/lib
set path = (. $HOME/EMAN/bin $HOME/bin /bin)
But when I add these to the .tcshrc nothing changes. What exactly am I doing wrong?
EDIT:
Should have posted this as a new thread. Sorry!
Last edited by boydasilva; 11-24-2004 at 01:47 PM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.