This commit is contained in:
naoufal zerai 2022-09-09 21:19:48 -04:00
parent 59b5eced3c
commit 51089ddd40
2 changed files with 88 additions and 0 deletions

View File

@ -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 <mark>"failed to fetch"</mark> error occurs when apt-get update is run, then try this:
<!--more-->
## 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

View File

@ -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 <mark>~/.config/user-dirs.dirs</mark> 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 <mark>/home/user/Dropbox/music</mark> you will change the file to look like this:
XDG_MUSIC_DIR=$HOME/Dropbox/music
Execute
xdg-user-dirs-update --force