Skip to content

neoinit/althost

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

althost

A drop-in alternative to hostnamectl for querying and changing the system hostname and related machine metadata.

Building from source

Requirements:

  • Zig 0.14.0 or later
  • libdbus-1 development headers (libdbus-1-dev on Debian/Ubuntu, dbus-devel on Fedora)
zig build

Install to /usr/local:

sudo zig build install --prefix /usr/local

Install with man page:

sudo zig build install man --prefix /usr/local

Usage

# Show current status
althost status

# Set static and transient hostname
sudo althost set-hostname myhost

# Set only static hostname
sudo althost set-hostname --static myhost

# Set only transient hostname (kernel, no persistence)
sudo althost set-hostname --transient myhost-tmp

# Set pretty hostname
sudo althost set-hostname --pretty "My Workstation"

# Set icon name
sudo althost set-icon-name computer-laptop

# Set chassis type
sudo althost set-chassis laptop

# Set deployment environment
sudo althost set-deployment production

# Set location
sudo althost set-location "Berlin, DE"

# Show version
althost --version

Compatibility

Platform Status
Linux Full support (D-Bus + direct file fallback)
FreeBSD Supported (direct file operations, no D-Bus)
OpenBSD Supported (direct file operations, no D-Bus)

License

GNU General Public License v3.0 or later. See the SPDX headers in each source file.

About

Hostname management tool

Topics

Resources

Contributing

Stars

Watchers

Forks

Releases

No releases published

Contributors

Languages