Putting IP Address into bash variable. Is there a better way May 24, 2023 by Tarik I’ve been struggling with this too until I’ve found there’s a simple command for that purpose hostname -i Is that simple!