Skip to content

Instantly share code, notes, and snippets.

@rm--
Created March 6, 2023 13:59
Show Gist options
  • Save rm--/7298f6cbafb4920b24e2dc59c40924f2 to your computer and use it in GitHub Desktop.
Save rm--/7298f6cbafb4920b24e2dc59c40924f2 to your computer and use it in GitHub Desktop.
replace all ips with new one in /etc/hosts

oip=<>;nip=<>;sudo gsed -i "s/$oip/$nip/g" /etc/hosts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment