Bash on Ubuntu on Windows gives error "-bash: /home/user/.bashrc: Permission denied" on startup

wjmccann

So I was working with Bash on Unbuntu on Windows in order to learn Linux, so I attempted to edit the .bashrc file as a way of learning. To do this I went into the root folder in my C: drive and opened the .bashrc in VS Code. I added one line into the end of the file.

When I tried to run ubuntu I got this error (even though it still works), and the error still persists even after I went in to try undo what I did before. What is wrong?

DeusExMachina

What is wrong?

As you mentioned that you went to root folder in C: drive and opened .bashrc in VSCode, I am assuming that the VSCode you just used was installed on Windows, not on WSL. Now I would like to refer you to a blog post on the official blog of Microsoft that explains the exact situation that you have encountered. This will help too.

To revert the changes, I would suggest you to open the .bashrc in the same way you did previously and copy all its content to a different file say, on your desktop. Remove .bashrc file. Now open a text editor in WSL preferably vim or gedit, make a file with name .bashrc, save it in the home directory and copy all the text that you saved on your desktop to the new .bashrc and it is all done.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

OMP error Bash on Ubuntu on Windows

From Dev

WSL Ubuntu, is there an easy way to have bash start automatically on Windows startup?

From Dev

Using Ubuntu's subsystem on Windows for 'make' gives java error

From Dev

Ubuntu error on startup

From Dev

Ubuntu gives error while update

From Dev

EPERM error when serving Phonegap under Windows 10 Ubuntu Bash

From Dev

xpra on Bash on Ubuntu on Windows

From Dev

What is Ubuntu's equivalent of Windows shell:startup?

From Dev

How to run Ubuntu service on Windows (at startup)?

From Dev

What is Ubuntu's equivalent of Windows shell:startup?

From Dev

wxPython gives different results on Windows and Ubuntu

From Dev

Bash script to display directory listing gives error

From Dev

command line argument in bash gives an error

From Dev

bash -c in subshell gives EOF parsing error

From Dev

On Hadoop installation, bash: gives an 'is a directory error'

From Dev

Startup error (line 119 and 121) Ubuntu

From Dev

Ubuntu 17.10 gives error when shutdown

From Dev

Startup error BackgroundContainer.dll on windows 8.1

From Dev

AutoIt Error on Startup after Installing Windows 10

From Dev

how to display startup error message in windows service?

From Dev

Anaconda unicode error on command line startup on Windows

From Dev

Windows 8 GetFileAsync method gives UnAuthorized error

From Dev

Windows gives error with package.json file

From Dev

Windows gives error with package.json file

From Dev

Creating symlink for a file on Windows 7 gives error

From Dev

Building Lua on windows gives undefined reference error

From Dev

Git checkout by date gives error on Windows

From Dev

windows xp dual-boot (wubi install) stopped working for ubuntu - gives "missing or corrupt system32\hal.dll" error

From Dev

windows xp dual-boot (wubi install) stopped working for ubuntu - gives "missing or corrupt system32\hal.dll" error

Related Related

  1. 1

    OMP error Bash on Ubuntu on Windows

  2. 2

    WSL Ubuntu, is there an easy way to have bash start automatically on Windows startup?

  3. 3

    Using Ubuntu's subsystem on Windows for 'make' gives java error

  4. 4

    Ubuntu error on startup

  5. 5

    Ubuntu gives error while update

  6. 6

    EPERM error when serving Phonegap under Windows 10 Ubuntu Bash

  7. 7

    xpra on Bash on Ubuntu on Windows

  8. 8

    What is Ubuntu's equivalent of Windows shell:startup?

  9. 9

    How to run Ubuntu service on Windows (at startup)?

  10. 10

    What is Ubuntu's equivalent of Windows shell:startup?

  11. 11

    wxPython gives different results on Windows and Ubuntu

  12. 12

    Bash script to display directory listing gives error

  13. 13

    command line argument in bash gives an error

  14. 14

    bash -c in subshell gives EOF parsing error

  15. 15

    On Hadoop installation, bash: gives an 'is a directory error'

  16. 16

    Startup error (line 119 and 121) Ubuntu

  17. 17

    Ubuntu 17.10 gives error when shutdown

  18. 18

    Startup error BackgroundContainer.dll on windows 8.1

  19. 19

    AutoIt Error on Startup after Installing Windows 10

  20. 20

    how to display startup error message in windows service?

  21. 21

    Anaconda unicode error on command line startup on Windows

  22. 22

    Windows 8 GetFileAsync method gives UnAuthorized error

  23. 23

    Windows gives error with package.json file

  24. 24

    Windows gives error with package.json file

  25. 25

    Creating symlink for a file on Windows 7 gives error

  26. 26

    Building Lua on windows gives undefined reference error

  27. 27

    Git checkout by date gives error on Windows

  28. 28

    windows xp dual-boot (wubi install) stopped working for ubuntu - gives "missing or corrupt system32\hal.dll" error

  29. 29

    windows xp dual-boot (wubi install) stopped working for ubuntu - gives "missing or corrupt system32\hal.dll" error

HotTag

Archive