Crates.io | locdev |
lib.rs | locdev |
version | 0.1.2 |
source | src |
created_at | 2023-05-25 17:20:47.539844 |
updated_at | 2023-05-26 18:20:44.695476 |
description | locdev is a command-line utility for managing your /etc/hosts file. |
homepage | |
repository | https://github.com/nrempel/locdev |
max_upload_size | |
id | 874433 |
size | 22,059 |
locdev is a handy CLI tool that simplifies the process of adding, removing, and listing entries in the hosts file. You no longer need to deal with manual and error-prone editing. Now, it's as simple as running a command.
You can download the compiled binaries for locdev from the
GitHub Releases page. Choose the
binary that corresponds to your operating system and architecture, and place it
in a directory included in your system's PATH
environment variable.
To install locdev using Cargo, you'll need to have Rust installed on your system. Once Rust is installed, you can install locdev with Cargo:
cargo install locdev
locdev [COMMAND]
add <ip> <hostname>
: Add an entry to the hosts file with the specified IP
and hostnameremove <ip> <hostname>
: Remove the entry with the specified IP and hostname
from the hosts filelist
: Print the current entries in the hosts fileAdd an entry to the hosts file:
sudo locdev add 127.0.0.1 dev.local
Remove an entry from the hosts file:
sudo locdev remove 127.0.0.1 dev.local
Print the current entries in the hosts file:
locdev list
You need to use sudo
to execute the add
and remove
commands, as the hosts
file requires administrator privileges to modify its contents.
This project is available under the MIT License.