I would recommend always testing shell scripts with https://github.com/koalaman/shellcheck. Often there is room for improvement that you don't think of yourself.
Linux
From Wikipedia, the free encyclopedia
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.
Rules
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
- No misinformation
- No NSFW content
- No hate speech, bigotry, etc
Related Communities
Community icon by Alpár-Etele Méder, licensed under CC BY 3.0
Nice one. Did not know about it.
cool, I've been using curl -s ifconfig.me
after dig +short myip.opendns.com
stopped working
If you really need to access your home IP often, a domain is definitely worth it. Cloudflare sells them cheap, then just run something like cf-ddns that will update the DNS record automatically every time you get a new IP.
I am using a python script that push in a private git repository (so I even have history). I am using dig +short myip.opendns.com @resolver1.opendns.com
command to check ip.
Pretty useful, definitely going to save this.
My home IP almost never changes, so I'd hate to pay for a static IP.
@Fubarberry @murkom noip.com has a free service I’ve used a bunch. Just run an app at home and select a domain. Some routers support the service too.
Thanks!
Thx, this is interesting. Im using duckdns atm, but would be nice to replace it with some local scrip if possible
I also use duckdns.
But as i like doing little scripts and wanted to try this, i remembered to share here.