• Alias suggestion for Antergos


    Hi all!
    I was playing around buildig an .iso and had the idea about creating an alias as bellow: I guess it would help new users and fix some errors about gpg keys etc.

    for .zshrc and .bashrc

    alias up=‘sudo pacman-key --init; sudo pacman-key --populate archlinux antergos; sudo pacman-key --refresh-keys; sudo pacman -Syy’

    Then new users (or old ones) can simply type up and many of those problems will be simply solved. I really think this should come with installed Antergos by default.

    Antergos (default OS) - WIN10 (abandoned)
    I3wm - Mate desktop
    AMD - A4 7300 Radeon graphics
    16 GB ram
    HD 1 TB
    Linux newbie since 06/2016

  • Aliases I regularly use in Arch and Antergos:

    #–just aliases start

    #–simplest upgrade, including AUR, cache cleaning
    alias up=‘yaourt -Syua && sync && sudo pacman -Scc && sync’

    #–stronger upgrade distro, forcing databases update, including AUR, cache cleaning
    alias ud=‘yaourt -Syyua && sync && sudo pacman -Scc && sync’

    #–optirun checks Bubmblebee functionality, switches Nvidia card off
    alias op=‘optirun pwd’

    #–optirun status returns Nvidia card’s status
    alias os=‘optirun --status’

    #–reflector updates Arch mirrorlist
    alias re=‘sudo reflector --age 8 --fastest 128 --latest 64 --number 32 --sort rate --save /etc/pacman.d/mirrorlist’

    #–the strongest refresh distro, used several times a day
    #-- - updates Arch’s mirrorlist
    #-- - upgrades distro, including AUR and forcing databases update
    #-- - cleans cache
    #-- - cleans journal, keeping only last 3 days
    alias rd=‘sudo reflector --age 8 --fastest 128 --latest 64 --number 32 --sort rate --save /etc/pacman.d/mirrorlist && yaourt -Syyua && sync && sudo pacman -Scc && sudo journalctl --vacuum-time=3d && sync’

    #–prints weather forecast for Rovaniemi in terminal
    alias we=‘curl http://wttr.in/rovaniemi

    #–xs switches display off, including backlight
    alias xs=‘xset dpms force off’

    #–just aliases end

    Almost always I combine them, for example

    re && op && xs
    

    and then go away to take a cup of tea.

  • @just very nice!
    is interesting that i tried to sequence my commands with “&&” but somehow didn’t work, then i had to use “;”

    The reflector one is a good idea for me to add here, i don’t use very often so never thought about including in alias, thanks.

    Antergos (default OS) - WIN10 (abandoned)
    I3wm - Mate desktop
    AMD - A4 7300 Radeon graphics
    16 GB ram
    HD 1 TB
    Linux newbie since 06/2016

  • I really like your aliases, @just. Here’s mine !!!


    #!/bin/sh
    #For a brief list of system information, please install “ufetch” and for a fun locomotive effect at the end of the processes, please install "sl"
    clear
    ufetch
    echo
    echo
    echo "HELLO! YOUR SYSTEM IS ABOUT TO BE FULLY UPDATED"
    echo
    echo
    echo “passsword” | sudo -S pacman -Syu --noconfirm
    yaourt -Syyua && sync --noconfirm
    echo
    echo
    echo
    echo "YOUR SYSTEM IS NOW FULLY UPDATED"
    echo
    echo
    echo
    yes | sudo pacman -Scc
    echo
    echo
    echo
    echo "YOUR CACHE HAS NOW BEEN CLEARED"
    echo "UNUSED PACKAGES ARE ABOUT TO BE REMOVED"
    echo
    echo
    echo
    yes | sudo yaourt -Qtd
    sudo journalctl --vacuum-time=3d && sync
    sl
    clear


    THis one I use almost every day. To invoke it, I just run update.sh.

    Keep trying, never give up. In the end, you will find that it was all worth it

    Community ISO: https://antergoscommunityeditions.wordpress.com
    Linux Basics: https://linuxbasicssite.wordpress.com

  • @Keegan said in Alias suggestion for Antergos:

    …update.sh

    Boo. Too long to type in :)

    Edit

    rd alias is optimized for fingers movement on English (US), English (UK), Italian (IT) keybordas.

    Terminal is launched by Ctrl+Alt+T combo. r and d are immediately to the left from t, Enter runs the command:

    Ctrl+Alt (with left hand) t r d (righ hand ring, middle, index fingers) Enter (right pinky finger)

    Five keypresses, with minimal fingers movement. Laziness is the engine of progress.

  • @just said in Alias suggestion for Antergos:

    Laziness is the engine of progress.

    :smile:. Love it! I think I’ll have to change mine.

    Keep trying, never give up. In the end, you will find that it was all worth it

    Community ISO: https://antergoscommunityeditions.wordpress.com
    Linux Basics: https://linuxbasicssite.wordpress.com

  • @Keegan
    This is a script hehehe.

    I was only meaning that something similar to what i proposed and @just’s alias for reflector (reflector could be installed as default)could be added in standard Antergos install.

    Then a user with updates problems could simply type up and re to fix some problems

    Antergos (default OS) - WIN10 (abandoned)
    I3wm - Mate desktop
    AMD - A4 7300 Radeon graphics
    16 GB ram
    HD 1 TB
    Linux newbie since 06/2016

  • @fernandomaroto said in Alias suggestion for Antergos:

    This is a script hehehe.

    I was only meaning that something similar to what i proposed and @just’s alias for reflector

    Sorry about that then. I must have misunderstood:smile:.

    Thank you!

    Keep trying, never give up. In the end, you will find that it was all worth it

    Community ISO: https://antergoscommunityeditions.wordpress.com
    Linux Basics: https://linuxbasicssite.wordpress.com

  • @just said in Alias suggestion for Antergos:

    sudo reflector --age 8 --fastest 128 --latest 64 --number 32 --sort rate --save

    I’m sorry, but I don’t quite understand what the numbers mentioned here do exactly, @judd. What does age 8, --fastest 128, --latest 64, and --number 32 do?

    Thank you!

    Keep trying, never give up. In the end, you will find that it was all worth it

    Community ISO: https://antergoscommunityeditions.wordpress.com
    Linux Basics: https://linuxbasicssite.wordpress.com

  • @Keegan said in Alias suggestion for Antergos:

    I don’t quite understand what the numbers mentioned here do exactly

    –age 8 = choose mirrors updated in the last 8 hours
    –fastest 128 = choose only 128 fastest from all of them
    –latest 64 = from 128 fastest select only 64 updated most recently
    –number 32 = from 64 most recently updated select the best 32 ones
    –sort rate = do all above while sorting all mirrors by download speed

  • Wow! Thank you so much:grinning:. What made you pick such specific numbers rather than rounding them off? (Just wondering).

    Keep trying, never give up. In the end, you will find that it was all worth it

    Community ISO: https://antergoscommunityeditions.wordpress.com
    Linux Basics: https://linuxbasicssite.wordpress.com

  • @Keegan said in Alias suggestion for Antergos:

    Lo siento, pero no entiendo muy bien lo que los números mencionados aquí hacen exactamente, @judd . ¿Qué hace la edad 8, - el más rápido 128, - el más reciente 64, y - el número 32?

    @just and NO @judd :)

    Autodidacta en la VIDA …y en Linux, también.

  • @judd said in Alias suggestion for Antergos:

    @just and NO @judd

    hehehe… Look who’s popular! I meant @just, I must have just typed the wrong person on accident:smile:.

    Thank you for telling me!

    Keep trying, never give up. In the end, you will find that it was all worth it

    Community ISO: https://antergoscommunityeditions.wordpress.com
    Linux Basics: https://linuxbasicssite.wordpress.com

  • @Keegan said in Alias suggestion for Antergos:

    What made you pick such specific numbers rather than rounding them off? (Just wondering).

    Just my love for binary system and for the “2^n”.

    You may vary the numbers as you wish, though with a few reasonable limitations. More with reflector --help.

  • More with reflector --help.

    Thanks again, @just! However, when I attempt to execute your command, it gives me this:

    [[email protected] ~]$ sudo reflector --age 8 --fastest 128 --latest 64 --number 32 --sort rate --save
    [sudo] password for keegan: 
    usage: Reflector.py [-h] [--connection-timeout n] [--list-countries]
                        [--cache-timeout n] [--save <filepath>]
                        [--sort {age,rate,country,score,delay}] [--threads n]
                        [--verbose] [--info] [-a n] [-c <country>] [-f n]
                        [-i <regex>] [-x <regex>] [-l n] [--score n] [-n n]
                        [-p <protocol>] [--completion-percent [0-100]]
    Reflector.py: error: argument --save: expected one argument
    [[email protected] ~]$
    

    What am I doing wrong?

    Keep trying, never give up. In the end, you will find that it was all worth it

    Community ISO: https://antergoscommunityeditions.wordpress.com
    Linux Basics: https://linuxbasicssite.wordpress.com

  • Just found out that f I exclude the --save at the end, it seems to work. When I execute it now, this is what I get:

    sudo reflector --age 8 --fastest 128 --latest 64 --number 32 --sort rate --country US
    ################################################################################
    ################# Arch Linux mirrorlist generated by Reflector #################
    ################################################################################
    
    # With:       reflector --age 8 --fastest 128 --latest 64 --number 32 --sort rate --country US
    # When:       2017-07-26 20:32:14 UTC
    # From:       https://www.archlinux.org/mirrors/status/json/
    # Retrieved:  2017-07-26 20:28:50 UTC
    # Last Check: 2017-07-26 20:05:47 UTC
    
    Server = http://mirror.as65535.net/archlinux/$repo/os/$arch
    Server = http://www.gtlib.gatech.edu/pub/archlinux/$repo/os/$arch
    Server = http://mirrors.gigenet.com/archlinux/$repo/os/$arch
    Server = http://arch.mirrors.pair.com/$repo/os/$arch
    Server = http://mirror.grig.io/archlinux/$repo/os/$arch
    Server = https://arch.localmsp.org/arch/$repo/os/$arch
    Server = http://cosmos.cites.illinois.edu/pub/archlinux/$repo/os/$arch
    Server = http://mirror.epiphyte.network/archlinux/$repo/os/$arch
    Server = http://mirror.vtti.vt.edu/archlinux/$repo/os/$arch
    Server = http://mirror.lty.me/archlinux/$repo/os/$arch
    Server = https://mirror.grig.io/archlinux/$repo/os/$arch
    Server = http://mirror.us.leaseweb.net/archlinux/$repo/os/$arch
    Server = http://mirrors.kernel.org/archlinux/$repo/os/$arch
    Server = http://mirror.metrocast.net/archlinux/$repo/os/$arch
    Server = http://mirror.cc.columbia.edu/pub/linux/archlinux/$repo/os/$arch
    Server = http://mirror.umd.edu/archlinux/$repo/os/$arch
    Server = http://mirrors.rit.edu/archlinux/$repo/os/$arch
    Server = http://mirrors.cat.pdx.edu/archlinux/$repo/os/$arch
    Server = http://mirrors.acm.wpi.edu/archlinux/$repo/os/$arch
    Server = http://mirror.htnshost.com/archlinux/$repo/os/$arch
    Server = http://mirrors.ocf.berkeley.edu/archlinux/$repo/os/$arch
    Server = http://mirrors.liquidweb.com/archlinux/$repo/os/$arch
    Server = rsync://mirrors.aggregate.org/archlinux/$repo/os/$arch
    Server = http://mirrors.advancedhosters.com/archlinux/$repo/os/$arch
    Server = rsync://mirrors.advancedhosters.com/archlinux/$repo/os/$arch
    Server = http://il.mirrors.linaxe.net/archlinux/$repo/os/$arch
    Server = http://il.us.mirror.archlinux-br.org/$repo/os/$arch
    Server = rsync://arch.mirror.constant.com/archlinux/$repo/os/$arch
    Server = http://mirror.cs.pitt.edu/archlinux/$repo/os/$arch
    Server = rsync://mirror.cc.columbia.edu/archlinux/$repo/os/$arch
    Server = https://mirrors.tuxns.net/archlinux/$repo/os/$arch
    Server = rsync://rsync.gtlib.gatech.edu/archlinux/$repo/os/$arch
    
    [[email protected] ~]$
    

    Is there anything I need to do now?

    Keep trying, never give up. In the end, you will find that it was all worth it

    Community ISO: https://antergoscommunityeditions.wordpress.com
    Linux Basics: https://linuxbasicssite.wordpress.com

  • @Keegan said in Alias suggestion for Antergos:

    Is there anything I need to do now?

    hehehe… I just figured my own question out through a little googling.

    Thanks anyways!

    Keep trying, never give up. In the end, you will find that it was all worth it

    Community ISO: https://antergoscommunityeditions.wordpress.com
    Linux Basics: https://linuxbasicssite.wordpress.com

  • @Keegan said in Alias suggestion for Antergos:

    Sorry about that then. I must have misunderstood.

    Don’t worry, it’s not a problem at all. Someday we could make a script’s thread, but now i’m just too lazy hehehe!

    Antergos (default OS) - WIN10 (abandoned)
    I3wm - Mate desktop
    AMD - A4 7300 Radeon graphics
    16 GB ram
    HD 1 TB
    Linux newbie since 06/2016

  • @Keegan said in Alias suggestion for Antergos:

    What am I doing wrong?

    Probably you’re missing the file name for mirrorlist to save. The full command is

    alias re='sudo reflector --age 8 --fastest 128 --latest 64 --number 32 --sort rate --save /etc/pacman.d/mirrorlist'
    

    Note the final /etc/pacman.d/mirrorlist - you save the generated mirrorlist here, overwriting the old, existing file.

  • @just said in Alias suggestion for Antergos:

    Probably you’re missing the file name for mirrorlist to save

    That was it:grinning:. I had found this out from a Arch wiki article online earleir (from my thread above which mentioned my success). but that was indeed my issue.

    Thanks!

    Keep trying, never give up. In the end, you will find that it was all worth it

    Community ISO: https://antergoscommunityeditions.wordpress.com
    Linux Basics: https://linuxbasicssite.wordpress.com

Posts 22Views 668
Log in to reply