0

I was doing some stuff in the terminal with .bashrc and I started to get an error right after every time I open terminal and it keeps staying that situation until I do Ctrl+C.

This is exactly what I see every time when I open terminal:

?\udcf7\udcca\udcd5\udcfewD\udcba\udcc4\udcf9\udc93\udcc3ڍ%\udcaeݞl\udcb0l\udcd8~\udcb3?vF-Jwx: command not found

VimCrypt~01!X\udca0oudc8f\udca1\udc85\udcb4\udcf1c\udce8KA\udcad\udcd2\udce6
\udce4*^u\udc84+o\udcf8\udcb8r\udcc5\udcc6WK^嬱: command not found

O\udcfd\udcc5I\udccbNeC\udc84: command not found

bash: /home/faruksimsekli/.bashrc: line 3: syntax error near unexpected token `)'
bash: /home/faruksimsekli/.bashrc: line 3: `���?�������7�V���o5ؚ-1W���]�fHel�CO>zسU��j�-�֦A��B>��pR�⚔P
                         ������)������%���#s,�(5~L��fo:(��re���a�
                                                                      0C+��؟�[ML��r�d'

faruksimsekli@7:~$ \udca9\udcb4\udce1x\udca4\udc9d\udc92svcl\udc85v\udc85\udccbc\udcb6u\udc8d\udcf1\udcc4: command not found
  • 2
    What did you do? It looks like .bashrc is filled with garbage, so my suggestion would be to remove it and recreate it: mv ~/.bashrc ~/.bashrc.old; cp /etc/skel/.bashrc ~/ - this will give you the default .bashrc for Ubuntu. – vidarlo Dec 26 '17 at 19:53
  • 3
    Why is that binary junk in your ~/.bashrc? – waltinator Dec 26 '17 at 19:54
  • 1
    @Cyrus that's what vidarlo's mv command does – Zanna Dec 26 '17 at 19:55
  • 2
    You edited the file with LibreOffice or something similar, right? And then said "Yes, save it as *.odt with pretty formatting and neat fonts." Don't do that. – PerlDuck Dec 26 '17 at 19:58
  • 1
    @FarukŞimşekli see my answer for what you did :) You encrypted it - and if you remember the passphrase, you can decrypt it... – vidarlo Dec 26 '17 at 20:09
6

What probably happend is this:

The user used vim on the file, as given by the fact that VimCrypt is shown in the text. When running vim, you can exit vim with :x - or encrypt with :X. Note that the former is lower case, the latter is upper case.

This would have encrypted the file upon save, rendering it as a garbled binary mess.

The easiest way out is to simply replace it by the standard Ubuntu .bashrc

mv ~/.bashrc ~/.bashrc.old ; cp /etc/skel/.bashrc ~/

This will backup your current .bashrc as .bashrc.old

If you remember the encryption key used you can upen it in vim again. Enter the correct passphrase, and type :X and press enter twice (giving a blank pass phrase) and save with :wq - this will restore the file if you do remember the passphrase.

  • 1
    Ah, wasn't aware htat vim can do encryption. /// The passphrase is probably something like :q<ESC>:<ESC><ESC>:q! ;-) – PerlDuck Dec 26 '17 at 20:09
  • 1
    Thats what I end up with in my config files whenever I use vim... – vidarlo Dec 26 '17 at 20:10

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.