From 51089ddd40dfcbc9e3f25a063db3a5df2a9278ff Mon Sep 17 00:00:00 2001 From: naoufal zerai Date: Fri, 9 Sep 2022 21:19:48 -0400 Subject: [PATCH] apt --- content/post/apt-issues.md | 59 +++++++++++++++++++ .../post/change-files-folder-default-path.md | 29 +++++++++ 2 files changed, 88 insertions(+) create mode 100644 content/post/apt-issues.md create mode 100644 content/post/change-files-folder-default-path.md diff --git a/content/post/apt-issues.md b/content/post/apt-issues.md new file mode 100644 index 0000000..1f68896 --- /dev/null +++ b/content/post/apt-issues.md @@ -0,0 +1,59 @@ ++++ +title = "Apt Issues" +date = 2022-09-09T19:36:53-04:00 +lastmod = 2022-09-09T19:36:53-04:00 +tags = ["apt","DNS","error"] +categories = ["Linux"] +imgs = [] +cover = "" # image show on top +readingTime = true # show reading time after article date +toc = true +comments = false +justify = false # text-align: justify; +single = false # display as a single page, hide navigation on bottom, like as about page. +license = "" # CC License +draft = false ++++ + +If you get a "failed to fetch" error occurs when apt-get update is run, then try this: + + + +## Edit DNS + +First try to ping any website + + ping zerai.xyz + +If you can't resolve the DNS + +{{< highlight bash-session >}} +ping: zerai.xyz: Temporary failure in name resolution +{{< /highlight >}} + +Then first edit resolv.conf + + sudo vi /etc/resolv.conf + +Change your DNS to any DNS Server + +{{< highlight bash-session >}} +nameserver 100.64.0.7 +{{< /highlight >}} + +Next execute this commands : + + sudo apt-get --download-only --reinstall install resolvconf + sudo dpkg --purge --force-depends resolvconf + sudo apt-get install resolvconf + +Finaly if you still have DNS problems a reboot is recommended + +## If you have an EOL version(Ubuntu) + +Just run + + sudo sed -i -r 's/([a-z]{2}.)?archive.ubuntu.com/old-releases.ubuntu.com/g' /etc/apt/sources.list +and + + sudo sed -i -r 's/security.ubuntu.com/old-releases.ubuntu.com/g' /etc/apt/sources.list diff --git a/content/post/change-files-folder-default-path.md b/content/post/change-files-folder-default-path.md new file mode 100644 index 0000000..3cd7c2b --- /dev/null +++ b/content/post/change-files-folder-default-path.md @@ -0,0 +1,29 @@ ++++ +title = "Change Files Folder Default Path" +date = 2022-09-09T20:55:58-04:00 +lastmod = 2022-09-09T20:55:58-04:00 +tags = ["tip","folders"] +categories = ["Linux"] +imgs = [] +cover = "" # image show on top +readingTime = true # show reading time after article date +toc = true +comments = false +justify = false # text-align: justify; +single = false # display as a single page, hide navigation on bottom, like as about page. +license = "" # CC License +draft = true ++++ + +First edit ~/.config/user-dirs.dirs so as to change the music folder to the path of the desired folder. + +You can use the following command: + + vi ~/.config/user-dirs.dirs + +For example, if your music resides in /home/user/Dropbox/music you will change the file to look like this: + + XDG_MUSIC_DIR=$HOME/Dropbox/music +Execute + + xdg-user-dirs-update --force \ No newline at end of file