Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This 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!


  Search this Thread
Old 04-10-2012, 01:45 AM   #1
Registered: Sep 2011
Posts: 81

Rep: Reputation: Disabled
Angry About .bash_profile

Hi Everyone,

I know that if we want to make r run anything while logging in you have add in .bash_profile script.
Actually when I opened the .bash_profile.....already it consist of something.what I did is I commented all the lines and saved the script....and now I restarted the system...but I can't find any changes.

So my doubt is can i remove the .bash_profile and restart the system...since there is no change when I did in the above way.......

Old 04-10-2012, 01:49 AM   #2
Registered: Sep 2011
Posts: 81

Original Poster
Rep: Reputation: Disabled
hey I had deleted the .bash_profile........but no changes.......system booted normally and I can logintoo
Old 04-10-2012, 02:05 AM   #3
Senior Member
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,284

Rep: Reputation: 371Reputation: 371Reputation: 371Reputation: 371
That's not abnormal. Probably there's an /etc/profile script that does much of your shell setup, which you can't delete (unless you become root, but I wouldn't recommended modifying /etc/profile in any way).

An interesting and potentially related tidbit is that .bash_profile is only run for login shells. For non-login shells ~/.bashrc is sourced instead. I generally have my .bash_profile source my .bashrc so my environment is consistent.
Old 04-10-2012, 02:29 PM   #4
Satyaveer Arya
Senior Member
Registered: May 2010
Location: Palm Island
Distribution: RHEL, CentOS, Debian, Oracle Solaris 10
Posts: 1,415

Rep: Reputation: 305Reputation: 305Reputation: 305Reputation: 305
.bash_profile file is for personal initialization executed for login shells. ommon uses for ~/.bash_profile are to set environment variables such as PATH, JAVA_HOME, create aliases for shell commands and set the default permissions for newly created files etc. .bashrc file is similar to .bash_profile file but the difference is .bash_profile runs only for bash login shells and .bashrc runs for every new bash shell. So if you delete .bash_profile file there is no harm.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
bash_profile strycnine Slackware 5 10-22-2006 02:11 PM
.bash_profile nguye103 Linux - Software 3 10-22-2004 01:48 PM
where is ~/.bash_profile? Jskill007 Slackware 4 09-17-2004 11:04 PM
.bash_profile praveenv Linux - Newbie 3 08-14-2004 12:58 PM
.bash_profile Wasim Haider Linux - General 2 09-16-2002 07:12 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:34 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration