Linux Quickies

From macwrench

Administration[edit]

apt - Find a package by its exact name[edit]

Normally apt search does a full text search for the specified needle by processing all package names and descriptions. If you want it to use the package names only, use this option instead:

apt search --names-only PACKAGENAME

And if you'd like to find an exact match you can use this expression here:

apt search ^PACKAGENAME$

Configure systemd-resolv to resolve local virtualhosts[edit]

Several distributions like Ubuntu Server now use systemd-resolv for DNS resolution, but this breaks resolving local virtualhosts (subdomains) hosted on this server.

If your network interface is configured via DHCP you should be able to opt-into UseDomains by creating

  /etc/systemd/network/usedomains.network

with this content:

[DNS] 
UseDomains=true

Source: bugs.launchpad.net #1699660 See also: A name resolution issue with systemd-resolved we found in the wild