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

~bashrc file content deleted

asked 2014-11-02 18:18:44 -0500

gwtw gravatar image

It seems like I have deleted content of this file by adding somthing wrong. Since I've had a longer break in my work can't really remember what did I do. But, when I open it (gedit ~/.bashrc) it is completely empty

Since I am a total beginner and don't really know what happened can someone please give me some idea about what to do and what does this even mean for my further work. thanks in advance.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2014-11-03 01:14:43 -0500

ahendrix gravatar image

If you've completely erased your ~/.bashrc, you can replace it by copying /etc/skel/.bashrc (This is the template that the user creation script used to create your bashrc).

edit flag offensive delete link more

answered 2014-11-02 19:13:28 -0500

Mehdi. gravatar image

Normally when you installed ROS you added the following line to your .bashrc

source /opt/ros/indigo(or any other distro)/setup.bash

This is only done for more convenience and if you only use one ROS disto. The content of a .bashrc is executed automatically whenever you open a terminal in order to setup some environment variables (telling linux where to find ROS). I don't know what implications a missing bashrc would have on linux but for ROS you just need to run the command I mentioned above in every new terminal you open and eventually also source any other workspaces you are using. Mostly it would look like this

source /home/user_name/some_workspace/devel/setup.bash

edit flag offensive delete link more

Question Tools


Asked: 2014-11-02 18:18:44 -0500

Seen: 2,534 times

Last updated: Nov 03 '14