ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
2

how to edit the ~/.bashrc file

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

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
5

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

jdorich gravatar image

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

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

Comments

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 -0600 )edit

Thanks. I have solved the problem.

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

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

SaiHV gravatar image

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

Use "gedit ~/.bashrc".

edit flag offensive delete link more

Comments

1

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 -0600 )edit
-1

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

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

Comments

1

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 -0600 )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 -0600 )edit
1

No. It is not.

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

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 -0600 )edit

Question Tools

Stats

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

Seen: 305,804 times

Last updated: Jan 31 '14