Skip to content

Instantly share code, notes, and snippets.

@yufengwng
Last active October 18, 2025 01:31
Show Gist options
  • Save yufengwng/9cff3fc82403e3f3052d to your computer and use it in GitHub Desktop.
Save yufengwng/9cff3fc82403e3f3052d to your computer and use it in GitHub Desktop.

Revisions

  1. yufengwng revised this gist Apr 29, 2017. 1 changed file with 3 additions and 0 deletions.
    3 changes: 3 additions & 0 deletions arch_cheatsheet.txt
    Original file line number Diff line number Diff line change
    @@ -9,6 +9,9 @@ update system
    list installed packages
    # pacman -Q

    list packages no longer required by others
    # pacman -Qdtq

    search installed packages
    # pacman -Qs <name>

  2. Yufeng Wang revised this gist Jan 12, 2015. 1 changed file with 28 additions and 1 deletion.
    29 changes: 28 additions & 1 deletion arch_cheatsheet.txt
    Original file line number Diff line number Diff line change
    @@ -47,4 +47,31 @@ enable/disable a service at bootup
    # systemctl (enable|disable) <unit>

    reload systemd
    # systemctl daemon-reload
    # systemctl daemon-reload

    manual install of AUR packages
    ==============================

    update repositories
    # pacman -Sy

    grab the package
    $ curl -O <url> (e.g. https://aur.archlinux.org/packages/ya/yaourt/yaourt.tar.gz)

    untar package
    $ tar xzvf <package.tar.gz>

    change into package directory
    $ cd <package>

    build and install
    $ makepkg -si

    java environments
    =================

    check status
    $ archlinux-java status

    set default version
    # archlinux-java set <version>
  3. Yufeng Wang created this gist Dec 9, 2014.
    50 changes: 50 additions & 0 deletions arch_cheatsheet.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,50 @@
    pacman
    ======

    view logs: /var/log/pacman.log

    update system
    # pacman -Syu

    list installed packages
    # pacman -Q

    search installed packages
    # pacman -Qs <name>

    search packages
    # pacman -Ss <name>

    install packages
    # pacman -S <name>

    remove package, its dependencies and config file backups
    # pacman -Rns <name>

    clean old packages in cache
    # pacman -Sc

    yaourt
    ======

    same as pacman

    systemd
    =======

    unit files: /usr/lib/systemd/system/ or /etc/systemd/system/

    list running units
    $ systemctl

    check status
    $ systemctl status <unit>

    start/stop a service
    # systemctl (start|stop) <unit>

    enable/disable a service at bootup
    # systemctl (enable|disable) <unit>

    reload systemd
    # systemctl daemon-reload