Question

Duda con respecto a una variable de env.....

como es la variable de env para saber el hostname? es que en zsh* es $HOST pero en bash no me sale nada

Subscribe
Share

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hey there!

In bash you should be able to use $hostname for the hostname env variable. To print it you can set it to a value like: testhost=$(hostname) then print it out using echo $testhost

You can also use the hostname command to print that out.

Hope it helps! Nate