mirror of
https://github.com/onceupon/Bash-Oneliner.git
synced 2024-11-25 22:07:01 +00:00
Networking
- resolve a domain to IP address
This commit is contained in:
parent
d7a768c446
commit
46bda81c1a
@ -2289,11 +2289,15 @@ ipmitool -I bmc lan set 1 defgw ipaddr 192.168.0.1
|
||||
## Networking
|
||||
[[back to top](#handy-bash-one-liners)]
|
||||
|
||||
##### Resolve a domain to an IP address in a Bash script?
|
||||
##### Resolve a domain to IP address(es)
|
||||
```bash
|
||||
dig +short www.example.com
|
||||
|
||||
# or
|
||||
host www.example.com
|
||||
```
|
||||
|
||||
|
||||
##### Send a ping with a limited TTL to 10 (TTL: Time-To-Live, which is the maximum number of hops that a packet can travel across the Internet before it gets discarded.)
|
||||
```bash
|
||||
ping 8.8.8.8 -t 10
|
||||
|
Loading…
Reference in New Issue
Block a user