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!
1Learn Linux commands
Open the GNOME terminal and run the following command:
echo ‘man `ls /usr/bin | shuf -n 1`’ >> ~/.bashrcNow, 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.
2 Answers
- First, open the file manager and go to your user folder.
- Then, press Ctrl+H, which should show you the hidden files.
- You should then be able to find a file named
.bashrc, which you can open with a text editor. - Remove the line referring to
ls /usr/bin ...and you should be good.
- Open Nautilus (file Manager). Type
<CTRL>-Lto make the navigation bar editable. (Note that<CTRL>-Lmeans you must press the Control key and the letterLon your keyboard simultaneously). - In the navigation bar, type
/etc/skel/and press<ENTER>. - Type
<CTRL>-Hto view hidden files. - Right click on the file named
.bashrc. - Select Copy from the context menu that pops up.
- Click
Homein the left navigation pane in Nautilus. This will show all the files in your home folder. - Right click on a blank space in the files area. Select Paste from the context menu that pops up.
- You will be asked to replace file
.bashrc? Click theReplacebutton to confirm. - Type
<CTRL>-Hto not show hidden files. - Now try to start Terminal and it should work.