There are quite a few ways to do this.
$ ifconfig
—————————-
$ _IP=$(hostname -I)
$ echo $_IP
—————————-
$ ip addr | grep inet
There are quite a few ways to do this.
$ ifconfig
—————————-
$ _IP=$(hostname -I)
$ echo $_IP
—————————-
$ ip addr | grep inet