.bashrc: Permission denied

前端 未结 4 1763
陌清茗
陌清茗 2020-12-28 16:42

I try to work with a project in vagrant. I have made the command vagrant ssh, and connected to VM. Now I need to edit .bashrc file to set path to

4条回答
  •  情深已故
    2020-12-28 17:23

    If you want to edit that file (or any file in generally), you can't edit it simply writing its name in terminal. You must to use a command to a text editor to do this. For example:

    nano ~/.bashrc
    

    or

    gedit ~/.bashrc
    

    And in general, for any type of file:

    xdg-open ~/.bashrc
    

    Writing only ~/.bashrc in terminal, this will try to execute that file, but .bashrc file is not meant to be an executable file. If you want to execute the code inside of it, you can source it like follow:

    source ~/.bashrc
    

    or simple:

    . ~/.bashrc 
    

提交回复
热议问题