Linux command
hostess 命令
安全
权限或系统影响较大,执行前请核对目标。
常用示例
Add a host entry
sudo hostess add [local.example.com] [127.0.0.1]
Remove a host entry
sudo hostess rm [local.example.com]
List all entries
hostess ls
Enable a disabled entry
sudo hostess on [local.example.com]
Disable an entry
sudo hostess off [local.example.com]
Check if entry exists
hostess has [local.example.com]
说明
hostess is an idempotent command-line tool for managing /etc/hosts. It simplifies adding, removing, and toggling host entries for development and testing. Entries can be disabled without removal. Requires root/sudo on Unix or elevated prompt on Windows.
FAQ
What is the hostess command used for?
hostess is an idempotent command-line tool for managing /etc/hosts. It simplifies adding, removing, and toggling host entries for development and testing. Entries can be disabled without removal. Requires root/sudo on Unix or elevated prompt on Windows.
How do I run a basic hostess example?
Run `sudo hostess add [local.example.com] [127.0.0.1]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
Where can I find more hostess examples?
This page includes 6 examples for hostess, plus related commands for nearby Linux tasks.