Help I broke terminal

I tried the below "tip" trying to learn different things I could do with terminal and it does not work. Now I get an error message when I open terminal. How can I delete what I did? Thank you!

Learn Linux commands

Open the GNOME terminal and run the following command:

echo ‘man `ls /usr/bin | shuf -n 1`’ >> ~/.bashrc

Now, whenever you open a terminal, you will be greeted by a man page of a random command. It’s a nice way to learn about new commands.

1

2 Answers

  1. First, open the file manager and go to your user folder.
  2. Then, press Ctrl+H, which should show you the hidden files.
  3. You should then be able to find a file named .bashrc, which you can open with a text editor.
  4. Remove the line referring to ls /usr/bin ... and you should be good.
  1. Open Nautilus (file Manager). Type <CTRL>-L to make the navigation bar editable. (Note that <CTRL>-L means you must press the Control key and the letter L on your keyboard simultaneously).
  2. In the navigation bar, type /etc/skel/ and press <ENTER>.
  3. Type <CTRL>-H to view hidden files.
  4. Right click on the file named .bashrc.
  5. Select Copy from the context menu that pops up.
  6. Click Home in the left navigation pane in Nautilus. This will show all the files in your home folder.
  7. Right click on a blank space in the files area. Select Paste from the context menu that pops up.
  8. You will be asked to replace file .bashrc ? Click the Replace button to confirm.
  9. Type <CTRL>-H to not show hidden files.
  10. Now try to start Terminal and it should work.
0

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like