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

后端 未结 13 779
一生所求
一生所求 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:50

    change user to root

    sodu su -
    

    browse to etc

    vi sudoers
    

    look for root user in user priviledge section. you will get it like

    root ALL=(ALL:ALL) ALL 
    

    make same entry for your user name. if you username is 'myuser' then add

    myuser ALL=(ALL:ALL) ALL
    

    it will look like

    root ALL=(ALL:ALL) ALL 
    
    myuser ALL=(ALL:ALL) ALL 
    

    save it. change root user to your user. now try the same where you were getting the sudoers issue

提交回复
热议问题