Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs

Dashboard
Notifications
Mark all as read
Q&A

Get current server of pacman

+2
−0

How do I get the URL of the remote repository that pacman uses to download packages?

I know that I can tell pacman which server to use by editing /etc/pacman.d/mirrorlist. But in my case, all of the lines are commented out and given that a command like pacman -Syu still works, I'm wondering which server pacman contacts to update the system.

Why does this post require moderator attention?
You might want to add some details to your flag.
Why should this post be closed?

0 comment threads

1 answer

+4
−0

with pacman --debug

We can display the mirrors that pacman uses with the --debug option.

For example, when running pacman --debug -Sy, pacman will write lines like these to standard error:

debug: core.db: url is http://mirrors.kernel.org/archlinux/core/os/x86_64/core.db

We can use grep to filter the lines containing URLs:

pacman --debug -Sy |& grep "url is"

Which prints this, in my case:

debug: core.db: url is http://mirrors.kernel.org/archlinux/core/os/x86_64/core.db
debug: core.db.sig: url is http://mirrors.edge.kernel.org/archlinux/core/os/x86_64/core.db.sig
debug: extra.db: url is http://mirrors.kernel.org/archlinux/extra/os/x86_64/extra.db
debug: extra.db.sig: url is http://mirrors.edge.kernel.org/archlinux/extra/os/x86_64/extra.db.sig
debug: community.db: url is http://mirrors.kernel.org/archlinux/community/os/x86_64/community.db
debug: community.db.sig: url is http://mirrors.edge.kernel.org/archlinux/community/os/x86_64/community.db.sig

The ampersand after the pipe in the command above will also redirect the standard error stream to grep, not only standard out.

Why does this post require moderator attention?
You might want to add some details to your flag.

0 comment threads

Sign up to answer this question »

This community is part of the Codidact network. We have other communities too — take a look!

You can also join us in chat!

Want to advertise this community? Use our templates!