The mighty terminal

i just like to say a thing or two regarding the usage of aur with GUI or not.
since i first used manjaro when i was still distrohopping i tried to keep it to arch and using pamac, cause you know, GUI.
but since this months i tried using the terminal more and for quite a while into this month (like a week?) i removed pamac and have turned to terminal only for update and aur stuff.
while i am in now way capable nor patient enough to make everything terminal based (i need me some GUI for certain things, and convenience) but i do find at the very least i dont need no GUI helper anymore.

5 Likes

sometimes i use a gui helper, like pkgbrowser (qt5) from aur to search package… aur & repo

further i have a synaptic looks of small gui fromaur tkpacman… pretty stable using pacman, updating is just by a script and keybinding. also checkupdates is also there :slight_smile:

vpacman i do use sometimes also here and then but everyone as its preferences at the end :slight_smile:

1 Like

forgot to mention, the newest change of their gui also turned me off so much i couldn’t stand it anymore :laughing:

2 Likes

@AmandaONeill
I think the more you use the terminal, the more you’ll like it. Of course terminal is not the best answer for everything (that’s why we have GUIs!), but when accustomed to the terminal, it is very useful for many things.

And while using the terminal, it also helps even more to be (gradually) more familiar with bash capabilities (like aliases, functions, and eventually, scripts). And on that road, only the sky is the limit…

7 Likes

How DARE you! :rofl:

:wink:

4 Likes

I would like to add, that DuckDuckGo has bang support, which, at least for me, has become incredibly useful for arch related stuff.

!aw seatch-term
!pkg package-name
!aur AURpkg-name
!archlinux forum-search-term

2 Likes

i would consider myself pretty illiterate when it comes to advanced function, or rather…idk, i think the words is intimidated? im not sure what word would be accurate for it.
anyway you are correct, i find for aur and updates after pamac butchered their UI is the easier and more comfortable option.

however if one find that a GUI helper has a similar or same UI before they did…whatever they did im always open to listen, testing things out and all that jazz.

Bash knowledge fortunately is not required. But even when you use pacman or yay on the terminal, you are already using bash (unless you have another shell like zsh…).

To start looking at the bash capabilities, the easy start is to try some bash aliases.
An alias is another name for one or many commands. For example:

alias Update='yay -Syu'

is an alias definition that you can write in the end of your ~/.bashrc file.
The Update alias is available after each login. And it starts the yay command with options for updating all your software.

Then a slightly bigger example:

alias Update2='Update ; sudo paccache -rk3'

Now Update2 does two things: calls alias Update, and then calls paccache -rk3 (as root). This paccache stuff manages your package cache and deletes all but 3 latest of each package. And helps keep your disk from running out of space.

So that’s a small and easy start for useful bash features. There are lots more if you are willing to start doing that. :sweat_smile:

2 Likes

Checkupdates has also a function you can download the updates and decide later to install probably works the same as sudo pacman -Sywu lol

1 Like

Well this one gets bookmarked :yum:
Just did this…very convenient!

~ $ alias yay='yay ; sudo paccache -rk3'
~ $ yay
[sudo] password for elloquin: 
:: Synchronizing package databases...
 core                             132.3 KiB  8.08 MiB/s 00:00 [#################################] 100%
 extra                           1647.0 KiB  48.7 MiB/s 00:00 [#################################] 100%
 community                          5.3 MiB  11.4 MiB/s 00:00 [#################################] 100%
 multilib                         152.0 KiB  6.19 MiB/s 00:00 [#################################] 100%
:: Starting full system upgrade...
resolving dependencies...
looking for conflicting packages...

Packages (2) gptfdisk-1.0.6-1  libdrm-2.4.104-1

Total Download Size:   0.46 MiB
Total Installed Size:  1.73 MiB
Net Upgrade Size:      0.05 MiB

:: Proceed with installation? [Y/n] y
:: Retrieving packages...
 gptfdisk-1.0.6-1-x86_64          205.5 KiB  8.73 MiB/s 00:00 [#################################] 100%
 libdrm-2.4.104-1-x86_64          268.7 KiB  26.2 MiB/s 00:00 [#################################] 100%
(2/2) checking keys in keyring                                [#################################] 100%
(2/2) checking package integrity                              [#################################] 100%
(2/2) loading package files                                   [#################################] 100%
(2/2) checking for file conflicts                             [#################################] 100%
(2/2) checking available disk space                           [#################################] 100%
:: Processing package changes...
(1/2) upgrading gptfdisk                                      [#################################] 100%
(2/2) upgrading libdrm                                        [#################################] 100%
:: Running post-transaction hooks...
(1/1) Arming ConditionNeedsUpdate...
:: Searching databases for updates...
:: Searching AUR for updates...
 there is nothing to do
==> no candidate packages found for pruning
~ $ 
1 Like

Cool, i had no idea :slight_smile:
Thank you :partying_face:

Is that persistent though, or do you need to add it to .bashrc for persistence?
Also, a tip (not for you specifically, Elloquin, but in general): read .bashrc, look at what’s already there and how it’s written. That helped me create a handful of aliases for myself.

By the way, it looks like yay (without options, as I see in your paste) checks the official repos first (pacman -Syu), then the AUR, is that correct? (I’ve seen that behaviour before in ccr, the helper for the Chakra Community Repository, so it wouldn’t surprise me, I’d just like it confirmed :slight_smile: )

That is how I have always understood it to work. I wouldn’t recommend doing things like sudo pacman -Sy before using yay though. I use checkupdates if I want to see what is going to be updated. This way if I want to hold off for a bit I can.

You need to add it and then reboot.

's what I thought, cheers :slight_smile:

EDIT
See what happens when I play with new things…If you are still going to use yay for package searches,installs, etc this is not for you. It will bind yay to only update functions. If you use a different helper for the former then it is fine. Another way to accomplish the same result would be:
alias update='yay ; sudo paccache -rk3' Then you should maintain all yay fuctionality.

~ $ alias update='yay ; sudo paccache -rk3'
~ $ update
[sudo] password for elloquin: 
:: Synchronizing package databases...
 core is up to date
 extra is up to date
 community is up to date
 multilib is up to date
:: Starting full system upgrade...
 there is nothing to do
:: Searching databases for updates...
:: Searching AUR for updates...
 there is nothing to do
==> no candidate packages found for pruning
~ $ yay inxi
5 aur/inxi-perl-git r3749.05e55f8b-1 (+1 0.02) 
    Pinxi, development branch of inxi, a full featured CLI system information tool
4 aur/fcitx5-flypy-git r3.6d9e657-1 (+1 0.86) 
    XiaoHeYinXing table for fcitx, also known as flypy or xhup.
3 aur/inxi-git 3.2.01.r0.gdf45e6d4-1 (+3 0.01) 
    Full featured CLI system information tool
2 aur/geeknote-improved-git 2.0.17.r833.21cbc2b-1 (+13 0.00) 
    Work with Evernote & Yinxiang from the command line. This fork has everything geeknote does and more for example the ability to upload documents. It also has much more active development.
1 aur/inxi 3.2.01.1-1 (+128 4.50) (Out-of-date: 2021-01-10) 
    Full featured CLI system information tool
==> Packages to install (eg: 1 2 3, 1-3 or ^4)
==> 

You can just create pacman hook(s) like i did :wink:

Put em in /etc/pacman.d/hooks/

99-clear-paccache.hook

[Trigger]
Type = Package
Operation = Install
Operation = Upgrade
Operation = Remove
Target = *

[Action]
Description = Clear pacman cache...
When = PostTransaction
Exec = /usr/bin/paccache -rk2

99-clear-paccache-unused.hook

[Trigger]
Type = Package
Operation = Install
Operation = Upgrade
Operation = Remove
Target = *

[Action]
Description = Clear pacman unused cache...
When = PostTransaction
Exec = /usr/bin/paccache -ruk0

2 Likes

Why would you do that?

Update contains 8 keystrokes (9 if you use Caps Lock).
yay contains 4 keystrokes (and two of them are the same key). yay -Syu is pointless.

Actually, add it, then try:

source ~/.bashrc

will activate it from there. reboot is optional at most. Close and restart terminal also has that effect…

I find I prefer to separate the functions - so I have an update alias that does a

sudo pacman -Syu

and when I feel like it I do

yay -Sua

for AUR packages. It makes for better control over things NOT to upgrade from the AUR (no time, no need, would mess something up, would actually downgrade version I have, etc) Setting yay loose with sudo already active doesn’t match my use case :grin:

2 Likes