I am a Arch user and I love it, but I have to use CentOS in my office and at my laptop to comply with my office policy. So I want to use CentOS 7 as my desktop and I also don't want to leave Arch Linux completely. So is there a way by which I can install pacman in CentOS 7 and have test of two different distros?


You can install and use pacman but you can't use AUR repo in CentOS 7

Arch users having to temporarily deal with another Linux distribution can use pacapt, a simple wrapper around other package managers.

To install pacapt run the following commands:

sudo wget -O /usr/local/bin/pacapt \
sudo chmod 755 /usr/local/bin/pacapt
sudo ln -sv /usr/local/bin/pacapt /usr/local/bin/pacman || true
  • Thanks for the answer. But I want to install pacman and yaourt. I am trying to make pcaman in centos to see how its work then i will try yaourt. But thanks for the idea abt pacapt. It sounds interesting and i will try it on debian. – muhammad Sep 2 '16 at 5:49

No, there isn't (or rather, you shouldn't try to do this) — you need to use your distribution's package manager.

  • pacman is distro agnostic; so it is theoretically possible. That, of course, doesn't mean it is a good idea... – jasonwryan Sep 1 '16 at 21:31
  • True, but that won't give you AUR which seems to be what many Arch users are after with this type of request. – Stephen Kitt Sep 1 '16 at 21:48
  • That's a second order issue: people not understanding pacman has nothing to do with AUR. Sigh. – jasonwryan Sep 1 '16 at 21:56

you can simply install archlinux in chroot. not performance drawbacks as much as I know.

  1. you can download archlinux-bootstrap-2016.08.01-x86_64.tar.gz from any archlinux official mirrror.
  2. extract it and cd into it.
  3. run the following mount commands mount -t proc proc proc/ mount --rbind /sys sys/ mount --rbind /dev dev/ mount --rbind /run run/
  4. finally run the chroot chroot . /bin/bash

and now you should have a working archlinux chroot environment to enjoy.

  • Thanks for the out of the box answer but did you try it?? Isn't it a risky approach in server environment? I am not talking about my office's server but my server. – muhammad Sep 2 '16 at 5:48
  • Chroot is a shortcut for "Change root". it's first arguments is where we have the root filesystem of archlinux, the second argument is which program you wish to execute. chroot is safe, and it's meant for safety. developers are using it to test software without affecting the OS itself. you have more alternatives like systemd-nspawn, lxc. but chroot is simple, safe enough, old school solution, and doesn't require as much resources. – lyoko the Sep 3 '16 at 13:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.