Page 1 sur 1

Wajig, le couteau suisse de l'administrateur

Posté : ven. 23 juil. 2021 15:41
par jlb
wajig-logo.png

​​​​​​​Comme son nom — formé à partir du japonais "wa" (esprit d'équipe) et de l'anglais "jig" (petit outil pour en guider d'autres) — l'indique, Wajig propose une interface simplifiée en ligne de commande qui effectuera à votre place toutes sortes de tâches d'administration de systèmes basés sur Debian — Ubuntu et Zorin, par voie de conséquence.
Plus besoin de passer par "apt", "apt-get", ou d'autres commandes plus exotiques, Wajig traitera votre requête sans que vous ayez à vous préoccuper des différents outils à mettre en oeuvre.
Il n'est même plus nécessaire de taper "sudo" en tête de ligne : Wajig se lance en mode utilisateur et ne vous demandera votre mot de passe que s'il a besoin de privilèges plus élevés.

Code : Tout sélectionner

wajig install firefox
[sudo] Mot de passe : 
Lecture des listes de paquets... Fait
Construction de l'arbre des dépendances       
Lecture des informations d'état... Fait
firefox est déjà la version la plus récente (90.0+build1-0ubuntu0.20.04.1).
0 mis à jour, 0 nouvellement installés, 0 à enlever et 0 non mis à jour.

Une application de plus pour économiser trois caractères ? Un "sudo apt install" aurait fait la même chose... Certes, mais là où Wajig devient particulièrement intéressant, c'est qu'il possède une kyrielle de commandes, des plus basiques aux plus pointues.

Code : Tout sélectionner

wajig commands
​​​​​​​
  • addcdrom          Add a Debian CD/DVD to APT's list of available sources
  • addrepo          Add a Launchpad PPA (Personal Package Archive) repository
  • aptlog          Display APT log file
  • autoalts          Mark the Alternative to be auto-set (using set priorities)
  • autoclean          Remove no-longer-downloadable .deb files from the download cache
  • autodownload          Do an update followed by a download of all updated packages
  • autoremove          Remove unused dependency packages
  • build          Get source packages, unpack them, and build binary packages from them.
  • builddeps          Install build-dependencies for given packages
  • changelog          Display Debian changelog of a package
  • clean          Remove all deb files from the download cache
  • contents          List the contents of a package file (.deb)
  • dailyupgrade          Perform an update then a dist-upgrade
  • dependents          Display packages which have some form of dependency on the given package
  • describe          Display one-line descriptions for the given packages
  • describenew          Display one-line descriptions of newly-available packages
  • distupgrade          Comprehensive system upgrade
  • download          Download one or more packages without installing them
  • editsources          Edit list of Debian repository locations for packages
  • extract          Extract the files from a package file to a directory
  • fixconfigure          Fix an interrupted install
  • fixinstall          Fix an install interrupted by broken dependencies
  • fixmissing          Fix and install even though there are missing dependencies
  • force          Install packages and ignore file overwrites and depends
  • hold          Place packages on hold (so they will not be upgraded)
  • info          List the information contained in a package file
  • init          Initialise or reset wajig archive files
  • install          Package installer
  • installsuggested          Install a package and its Suggests dependencies
  • integrity          Check the integrity of installed packages (through checksums)
  • large          List size of all large (>10MB) installed packages
  • lastupdate          Identify when an update was last performed
  • listall          List one line descriptions for all packages
  • listalternatives          List the objects that can have alternatives configured
  • listcache          List the contents of the download cache
  • listcommands          Display all wajig commands
  • listdaemons          List the daemons that wajig can start, stop, restart, or reload
  • listfiles          List the files that are supplied by the named package
  • listhold          List packages that are on hold (i.e. those that won't be upgraded)
  • listinstalled          List installed packages
  • listlog          Display wajig log file
  • listnames          List all known packages; optionally filter the list with a pattern
  • listpackages          List the status, version, and description of installed packages
  • listscripts          List the control scripts of the package of deb file
  • listsection          List packages that belong to a specific section
  • listsections          List all available sections
  • liststatus          Same as list but only prints first two columns, not truncated
  • localupgrade          Upgrade using only packages that are already downloaded
  • madison          Runs the madison command of apt-cache
  • move          Move packages in the download cache to a local Debian mirror
  • new          Display newly-available packages
  • newdetail          Display detailed descriptions of newly-available packages
  • news          Display the NEWS file of a given package
  • nonfree          List packages that don't meet the Debian Free Software Guidelines
  • orphans          List libraries not required by any installed package 
  • policy          From preferences file show priorities/policy (available)
  • purge          Remove one or more packages and their configuration files
  • purgeorphans          Purge orphaned libraries (not required by installed packages)
  • purgeremoved          Purge all packages marked as deinstall
  • rbuilddeps          Display the packages which build-depend on the given package
  • readme             Display the README file(s) of a given package
  • recdownload          Download a package and all its dependencies
  • recommended          Display packages installed as Recommends and have no dependents
  • reconfigure          Reconfigure package
  • reinstall          Reinstall the given packages
  • reload          Reload system daemons (see LIST-DAEMONS for available daemons)
  • remove             Remove packages (see also PURGE command)
  • removeorphans          Remove orphaned libraries
  • repackage          Generate a .deb file from an installed package
  • reportbug          Report a bug in a package using Debian BTS (Bug Tracking System)
  • restart          Restart system daemons (see LIST-DAEMONS for available daemons)
  • rpm2deb          Convert an .rpm file to a Debian .deb file
  • rpminstall          Install an .rpm package file
  • search          Search for package names containing the given pattern
  • searchapt          Find nearby Debian package repositories
  • show          Provide a detailed description of package
  • sizes          Display installed sizes of given packages
  • snapshot          Generates a list of package=version for all installed packages
  • source          Retrieve and unpack sources for the named packages
  • start          Start system daemons (see LIST-DAEMONS for available daemons)
  • status          Show the version and available versions of packages
  • statusmatch          Show the version and available versions of matching packages
  • stop          Stop system daemons (see LISTDAEMONS for available daemons)
  • tasksel          Run the task selector to install groups of packages
  • todo          Display the TODO file of a given package
  • toupgrade          List versions of upgradable packages
  • tutorial          Display wajig tutorial
  • unhold          Remove listed packages from hold so they are again upgradeable
  • unofficial          Search for an unofficial Debian package at apt-get.org
  • update          Update the list of new and updated packages
  • updatealternatives          Update default alternative for things like x-window-manager
  • updatepciids          Updates the local list of PCI ids from the internet master list
  • updateusbids          Updates the local list of USB ids from the internet master list
  • upgrade          Conservative system upgrade
  • upgradesecurity          Do a security upgrade
  • verify          Check package's md5sum
  • versions          List version and distribution of given packages
  • whichpackage          Search for files matching a given pattern within packages

Mieux ! Avec le mode "teach", il expliquera aux curieux quelles commandes sont activées et comment elles fonctionnent : 

Code : Tout sélectionner

wajig install firefox --teach

/usr/bin/sudo /usr/bin/apt-get --auto-remove install firefox
LC_ALL=C; export LC_ALL; cat /var/lib/dpkg/status | egrep '^(Package|Status|Version):' | awk '/^Package: / {pkg=$2} /^Status: / {s1=$2;s2=$3;s3=$4} /^Version: / {print pkg,$2,s1,s2,s3}' | grep 'ok installed' | awk '{print $1,$2}' | sort -u -k 1b,1 > /tmp/wajig_rpe9vxoa
Lecture des listes de paquets... Fait
Construction de l'arbre des dépendances       
Lecture des informations d'état... Fait
firefox est déjà la version la plus récente (90.0+build1-0ubuntu0.20.04.1).
0 mis à jour, 0 nouvellement installés, 0 à enlever et 0 non mis à jour.
LC_ALL=C; export LC_ALL; cat /var/lib/dpkg/status | egrep '^(Package|Status|Version):' | awk '/^Package: / {pkg=$2} /^Status: / {s1=$2;s2=$3;s3=$4} /^Version: / {print pkg,$2,s1,s2,s3}' | grep 'ok installed' | awk '{print $1,$2}' | sort -u -k 1b,1

Il faudra parfois installer une autre application pour obtenir ce que vous souhaitez, rechercher les paquets orphelins, par exemple. Mais là encore, Wajig vous explique tout :

Code : Tout sélectionner

wajig orphans
This command depends on 'deborphan' being installed.
Une fois "deborphan" installé, vous n'aurez pas à apprendre sa syntaxe puisque Wajig se chargera de tout. Et vous pouvez lui faire confiance : il est le fruit d'une vingtaine d'années de développement.

Ah oui, je n'ai pas précisé que le mot anglais "jig" désigne aussi — comme en français — une danse rustique joyeuse. Et comment ne pas avoir envie de danser une petite gigue devant autant d'efficacité ?

Allez un dernier...

Code : Tout sélectionner

sudo apt install wajig
... pour l'essayer ?  ;) ​​​​​​​
​​​​​​​