/etc/apt/sources.list" E212: Can't open file for writing

后端 未结 13 694
一生所求
一生所求 2020-12-22 15:06

I am trying to edit sources.list using vi editor but getting the following error while saving the file:

/etc/apt/sources.list\" E212: Can\'t open file for wr         


        
13条回答
  •  隐瞒了意图╮
    2020-12-22 15:33

    I referenced to Zsolt in level 2, I input:

    :w !sudo tee % > /dev/null
    

    and then in my situation, I still can't modify the file, so it prompted that add "!". so I input

    :q! 
    

    then it works

提交回复
热议问题