LinuxQuestions.org
Visit Jeremy's Blog.
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 02-18-2011, 03:08 PM   #1
Rahulr7
LQ Newbie
 
Registered: Feb 2011
Posts: 2

Rep: Reputation: 0
how to Edit the .bash_profile being a normal user in Red Hat Linux?


I have installed Oracle Database server in Red Hat Linux for the first time. I edited the .bash_profile first time & defined some parameters like "export ORACLE_SID =orcl".I quit the editing. Then When I entered ". .bash_profile" it got error " not a valid identifier" it shows like

"bash: export: '=orcl' : not a valid identifier

for all the lines I edited it shows same error beacause I think I put a space in between "ORACLE_SID" & "=orcl".

So when I tried to edit that using "vi .bash_profile" being a normal user. It doesn't allow me editing.when I try to delete that space (because I think I have got error) using Backspace key on my computer,,it just moves the cursor to left in stead of deleting that space.

so can you please provide me solution for editing this " .bash_profile" ?

Last edited by Rahulr7; 02-18-2011 at 04:28 PM.
 
Old 02-18-2011, 03:25 PM   #2
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,225

Rep: Reputation: 2521Reputation: 2521Reputation: 2521Reputation: 2521Reputation: 2521Reputation: 2521Reputation: 2521Reputation: 2521Reputation: 2521Reputation: 2521Reputation: 2521
it might help if you posted exactly what you added to the local normal user .bash_profile file

also that would not be the best place to make system changes

look at /etc/profile & /etc/bashrc
 
Old 02-18-2011, 03:26 PM   #3
xeleema
Member
 
Registered: Aug 2005
Location: D.i.t.h.o, Texas
Distribution: Slackware 13.x, rhel3/5, Solaris 8-10(sparc), HP-UX 11.x (pa-risc)
Posts: 987
Blog Entries: 4

Rep: Reputation: 252Reputation: 252Reputation: 252
Greetingz!

You need to go over bash's man page. Maybe google a bit.

To Define an Environment Variable in bash:
Code:
VAR_NAME=var_value
To Make an Environment Variable Persistent:
Code:
export VAR_NAME
To View an Environment Variable:
Code:
echo $VAR_NAME
Hit up my NewComer's Blog Post for a quick write-up (and some great links!).

If this post (or any other) was helpful, click "Yes" in the bottom-right-hand corner of the post.
Also, if your problem is solved, use the "Thread Tools" at the top of the page to mark this as [SOLVED].
 
Old 02-18-2011, 04:31 PM   #4
Rahulr7
LQ Newbie
 
Registered: Feb 2011
Posts: 2

Original Poster
Rep: Reputation: 0
I did what you asked.

Quote:
Originally Posted by John VV View Post
it might help if you posted exactly what you added to the local normal user .bash_profile file

also that would not be the best place to make system changes

look at /etc/profile & /etc/bashrc
I have provided the parameters I added in the .bash_profile.

please help me figure out the solution.
 
Old 02-18-2011, 05:11 PM   #5
smoker
Senior Member
 
Registered: Oct 2004
Distribution: Fedora Core 4, 12, 13, 14, 15, 17
Posts: 2,279

Rep: Reputation: 249Reputation: 249Reputation: 249
post your .bash_profile HERE .
Please use code tags.

Also, you need to learn VI.
You have to be in edit mode for the keys to work as you expect.
 
Old 02-18-2011, 08:19 PM   #6
xeleema
Member
 
Registered: Aug 2005
Location: D.i.t.h.o, Texas
Distribution: Slackware 13.x, rhel3/5, Solaris 8-10(sparc), HP-UX 11.x (pa-risc)
Posts: 987
Blog Entries: 4

Rep: Reputation: 252Reputation: 252Reputation: 252
Quote:
Originally Posted by Rahulr7 View Post
I have provided the parameters I added in the .bash_profile.
please help me figure out the solution.
Post the contents of your .bashrc or .bash_profile file that you are attempting to edit;

1) Run the following command;
Code:
grep -v "^#" .bash_profile | grep . | nl
2) Copy-and-Paste the output like so;
Quote:
[CODE]
Output that you copy-and-pasted
[/CODE]
Thank you.
 
  


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
lost user name and password for linux red hat help help hjepsen Red Hat 3 02-06-2006 08:39 PM
unable to edit grub in red hat randrake Linux - Enterprise 1 05-14-2004 02:28 AM
Registered Red Hat Linux user #XXXXXX ovparrilla Red Hat 1 04-21-2004 04:22 PM
edit Red Hat 9 Grub to boot Windows southsibling Linux - Software 3 12-18-2003 09:03 PM
normal user cannot edit vfat filesystem GT_Onizuka Linux - Newbie 3 10-17-2003 11:36 PM

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

All times are GMT -5. The time now is 03:09 AM.

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