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!
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
~/.bash_profile does not exist by default so you normally need to create it. Files beginning with a . are conventionally hidden so if looking for it with the ls command you need an option like -a and if using a graphical file system browser you may need to switch it to display hidden files (Ctrl+H on some).
this is a very good question since (my experience) most distributions go their own way.
The bash manpage says: if Bash is started as a login-shell, it reads /etc/profile and then (if present) the .profile in you home directory. If Bash is invoked not as a login shell, it reads the .bashrc in your home directory.
As a short answer to your question: if you don't have either a .bashrc nor a .profile, to find it out execute
within your home directory, then create a .bashrc, put the new environmentvariables into the file and make a symbolic link
ln -s .bashrc .profile
As I said most distributions go their own way, take a look at the Ubuntu manuals and at the manpage
Last edited by markush; 12-13-2010 at 09:05 AM.
Reason: forgot to say welcome and typo
Hi there, I tried to locate those files as you are said. I found .profile when I try to edit it says The Link ".profile" is broken. Move it to trash ? The link can't be used, because its target ".bashrc" does not exist.
Do i need to create a new file as .profile and add the parameters? if so how do i associate this file with the system. can u plz.. give me the steps to do the same. I have stuck here after installing oracle 11g and could not start SQL prompt...
I need to set oracle_home and path environment variables...
I am very new to linux. I simply installed the oracle 11g what are my post installation steps and how ? how do I start SQL and what are the steps I need to do after installing this oracle 11g. This will help me to resume the practice...
AFAIK login must be done, including when logging in to a GUI desktop so ~/.bash_profile is always run. On starting a terminal emulator in the desktop an "interactive non-login" shell is started and so ~/.bashrc is run. If the OP followed advice given earlier in the thread then ~/.bashrc is run from ~/.bash_profile so all the bases should be covered.
ok, you're right, it should be sourced anyway. But at least having a ~/.profile and a ~/.bash_profile is redundant since both are sourced under the same circumstances, namely when bash is the login-shell.