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.
i dont understand where to write that command ?
i dont have a .bashrc file.
the only file that i ve got is bash.bashrc and i dont have permission to write in that one,
so where should the source command go ..i have really no idea !
i am working using a knoppix cd ! i have a tmp directory that i ve added to my PATH !
yes , typing histoire in my xterm and using it as a built-in function is what i want,
but i want to keep the functions in my .profile file !
Look, Bash works the way the Bash developers intend it to work. If you want it to work some specific way, then you need to take the time to understand how Bash works. Believe it or not there is a freely available reference manual for Bash.
You have (more than) enough information in this thread to keep your functions in ~/.profile and make them available when you execute Bash. But, I'll give you a hint...add the line source ~/.profile to ~/.bashrc and/or ~/.bash_profile.
If ~/.bashrc doesn't exist, then create it. I didn't read carefully enough earlier to see that you were using a LiveCD. I don't use LiveCD's very often, but I believe you have write permission to the home directory. I would also suspect that any files you create will be lost when you reboot. Unless you remaster the LiveCD, you'll have to recreate the files each time you use Knoppix. But, I don't know this for 100% sure.
If you can't write to the home directory, then you will need to use scripts and if your want to just call histoire, then you'll need a script named histoire in /tmp with /tmp added to your PATH. Again, I suspect you'll need to recreate the script each time you boot the LiveCD.
Last edited by weibullguy; 01-03-2008 at 08:57 AM.
i dont have a .bashrc file
all i have is a .profile file added to my PATH !
i already read everythg there is on shell scripting! on the linuxcommand.org website the info is just not enough, i ve been trying to work this one problem out since yesterday,
so i will stick to typing .profile <nameoffunction> for the time being
i dont know where to write this source sentence since i cant access the bash.bashrc file , so thats that i guess !
thank you for your help
i think that i should install Linux on my computer to be able to continue with this issue, the xterm just disappears everytime i type . .profile !
accessible means "being able to use them!"
i want to use the commands without having to go to where the file is, open it and run the commands , i want to use them like built-in commands !
the easiest way is to stash a link or the program itself in /usr/local/bin or the like. Or make your own program directory and add it to your $PATH.
edit: Missed second page. this won't work on a liveCD
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.