LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 04-10-2012, 02:45 AM   #1
ravi_nandula
Member
 
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.......

Regards,
Ravi
 
Old 04-10-2012, 02:49 AM   #2
ravi_nandula
Member
 
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, 03:05 AM   #3
btmiller
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, 03: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.
 
  


Reply


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 03:11 PM
.bash_profile nguye103 Linux - Software 3 10-22-2004 02:48 PM
where is ~/.bash_profile? Jskill007 Slackware 4 09-18-2004 12:04 AM
.bash_profile praveenv Linux - Newbie 3 08-14-2004 01:58 PM
.bash_profile Wasim Haider Linux - General 2 09-16-2002 08:12 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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

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