Some very useful Arch Linux tips and tricks.

Posted: February 7, 2018. At: 9:34 AM. This was 3 weeks ago. Post ID: 11826
Page permalink.
WordPress uses cookies, or tiny pieces of information stored on your computer, to verify who you are. There are cookies for logged in users and for commenters. These cookies expire two weeks after they are set.

Get a comprehensive listing of all Arch Linux pacman mirrors.

curl -s -L "https://www.archlinux.org/mirrorlist/?country=all&protocol=https&use_mirror_status=on" 2>&1 | sed 's/^.//' > mirrorlist

A simple script to update your mirror listing on your Arch Linux system.

#!/bin/bash
echo "Fetching new sorted mirrorlist..."
curl -s -L "https://www.archlinux.org/mirrorlist/?country=all&protocol=https&use_mirror_status=on" 2>&1 | sed 's/^.//' > /etc/pacman.d/mirrorlist
cat /etc/pacman.d/mirrorlist | head -n 10
if [ -a /etc/pacman.d/mirrorlist.pacnew ]; then
  echo "Removing mirrorlist.pacnew..."
  rm /etc/pacman.d/mirrorlist.pacnew
fi
exit 0

Install a package on Arch Linux.

root@archlabs /home/jason # pacman -S vim

Update your Arch Linux packages.

root@archlabs /home/jason # pacman -Syu

See information about an installed package.

jason@archlabs ~ % pacman -Q vim
[sudo] password for jason: 
vim 8.0.1436-1

Search the package repositories for package(s) that contain a certain file.

jason@archlabs ~ % pacman -Ss "xscreensaver"
extra/xscreensaver 5.38-1
    Screen saver and locker for the X Window System

No comments have been made. Use this form to start the conversation :)

Leave a Reply