ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

how to edit the ~/.bashrc file

asked 2013-10-06 16:45:20 -0500

hangzhang gravatar image

The default editor for rosed is vim. To set the default editor to something else edit your ~/.bashrc file to include: export EDITOR='emacs -nw' But I don't know how to edit the ~/.bashrc file.

edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted

answered 2013-10-06 17:13:34 -0500

jdorich gravatar image

updated 2013-10-07 12:45:19 -0500

To edit it:

vi ~/.bashrc

and add that line. You could also use (as SaiHV answered)

gedit ~/.bashrc".

Make sure to

source ~/.bashrc

after editing it.

edit flag offensive delete link more


but how to add that line when I input: vi ~/.bashrc? I am new at this, could you give me the details, thanks so much.

hangzhang gravatar image hangzhang  ( 2013-10-06 17:54:56 -0500 )edit

Thanks. I have solved the problem.

hangzhang gravatar image hangzhang  ( 2013-10-06 21:30:39 -0500 )edit

answered 2013-10-06 18:11:52 -0500

SaiHV gravatar image

updated 2013-10-06 18:12:03 -0500

Use "gedit ~/.bashrc".

edit flag offensive delete link more



After you edit it you need to open a new terminal for it to take effect.

tfoote gravatar image tfoote  ( 2013-10-06 20:18:59 -0500 )edit

answered 2014-01-31 03:29:50 -0500

Warrior gravatar image

I just opened the .bashrc file and noticed that the command source /opt/ros/hydro/setup.bash is already there. I think in the Hydro distribution they have added the command into .bashrc file to bring more ease to life.

edit flag offensive delete link more



No; ROS does not automatically modify your .bashrc . You either added that line (possibly by following the setup directions) or your local system administrator put it there for you.

ahendrix gravatar image ahendrix  ( 2014-01-31 10:43:28 -0500 )edit

I just installed ROS Kinetic. When i opened the .bashrc file, the line was already there. It IS automatically generated now.

Shreeyak gravatar image Shreeyak  ( 2017-04-30 08:07:20 -0500 )edit

No. It is not.

gvdhoorn gravatar image gvdhoorn  ( 2017-04-30 09:30:22 -0500 )edit

Step 1.6 of the Kinetic Installation instructions for Ubuntu adds a line to your bashrc for sourcing Kinetic.

ahendrix gravatar image ahendrix  ( 2017-05-02 23:23:24 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2013-10-06 16:45:20 -0500

Seen: 289,215 times

Last updated: Jan 31 '14