Score:0

Ubuntu 22.04 sources. list access denied

va flag

I have an issue about how to enable the repositories, i copied and replaced the complete sources.list files in the sources.list document using wsl 2. After replacing and saving an image popped up enter image description here. Any clues ?

Esther avatar
es flag
do not edit WSL files from inside Windows, you can ruin the file permissions that way because Windows file permissions don't work like Linux file permissions. Use a terminal text editor inside WSL to edit sources.list, NOT notepad.exe
Esther avatar
es flag
in general, you need `sudo` to edit sources.list, and your *windows* user hasn't used `sudo` (obviously), so of course it won't work.
Nmath avatar
ng flag
Use a text editor like nano to edit sources. Editing sources is not something you should do carelessly. Bad sources and misconfigured sources can break your system and it can open you up to security vulnerabilities. Don't edit sources unless you know exactly what you're doing and you are fully aware of the consequences. `sudo nano /etc/apt/sources.list` will allow you to edit this file. Make a backup and proceed with caution
NotTheDr01ds avatar
vn flag
@Esther AFAIK, editing WSL files via Notepad is *fairly* safe. First, Notepad now understands Linux line-endings. Second, permissions are properly handled via the 9P filesystem as long as `\\wsl$\` or `\\wsl.localhost\` are used (which it is in this case). Are you thinking about the old [WSL1 file/permissions corruption issue](https://devblogs.microsoft.com/commandline/do-not-change-linux-files-using-windows-apps-and-tools/)? The downside is that root-owned files can't be edited through 9P and, if a new file is created (not the case here), it will have CRLF endings, which is bad.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.