Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

macsig

macrumors regular
Original poster
Oct 27, 2006
236
0
Marina del Rey, CA
Hello guys,
How can I edit .bashrc ?
I'm playing around with RVM and I need to add a line at the end of that file but I have no idea how to do that.

Thanks
 
If you don't know how to edit you may want to rethink editing it as it can cause problems if you mess up. But if you want to, just open Terminal and enter the following.
Code:
pico ~/.bashrc
or to open in TextEdit.
Code:
open -t ~/.bashrc
 
Another handy tip for the command line is the more command, which lets your view documents like .bashrc without opening an editor. Obviously, you must open it in a text editor to actually change anything.

Code:
$ more .bashrc
 
But if you want to, just open Terminal and enter the following.
Code:
pico ~/.bashrc
FWIW, pico has been removed from OSX (since Tiger i believe) and replaced with nano.

Apple has provided a symlink, so that the "command" pico will still appear to function:
Code:
$ [COLOR="Blue"]type -a nano pico[/COLOR]
nano is /usr/bin/nano
pico is /usr/bin/pico

$ [COLOR="Blue"]ls -l `whereis nano pico`[/COLOR]
-rwxr-xr-x  1 root  wheel  297424 Sep 23  2007 /usr/bin/nano
lrwxr-xr-x  1 root  wheel       4 Mar 14  2009 /usr/bin/pico -> nano
 
FWIW, pico has been removed from OSX (since Tiger i believe) and replaced with nano.

Apple has provided a symlink, so that the "command" pico will still appear to function

This is fairly standard in *nix's. nano was designed to be a drop-in replacement for pico, and you have to be pretty savy to tell them apart.
 
This is fairly standard in *nix's. nano was designed to be a drop-in replacement for pico, and you have to be pretty savy to tell them apart.
I know what you mean, but i couldn't resist...
Code:
$ [COLOR="Blue"]pico foo[/COLOR]

GNU [COLOR="Magenta"][B][SIZE="3"]nano[/SIZE][/B][/COLOR] 2.0.1[SIZE="1"]                 File: foo
_




                                [ New File ]
^G Get Help ^O WriteOut ^R Read File^Y Prev Page^K Cut Text ^C Cur Pos
^X Exit     ^J Justify  ^W Where Is ^V Next Page^U UnCut Tex^T To Spell
[/SIZE]
;) (at least that's what an OSX user gets)
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.