FAQ Database Discussion Community


How can I find someones hostname?

c++,windows,string,hostname
To go more indepth i have a program where I want to prompt the user to type their given username and password (Given from me) and make them type it in, if it is correct it will run a check on the hostname to see if the password matches their...

os.hostname() to return an IP

node.js,raspberry-pi,hostname
I have this raspberryPi with Node.JS running on top of it. By calling os.hostname(), the Pi returns "raspberry". I'm aware on how to modify this behaviour. What I don't know is how to do so in order to have it return an IP. The raspberry is connected in a distributed...

Find and print the host name of the mysql in wordpress

php,mysql,wordpress,hostname
I am trying to find the hostname of the sql using wordpress. ie I wanted to print the 'localhost' from 'http://**localhost**/velocity/wordpress/?page_id=4' I tried the function home_get_url(), but I got the entire path as shown above. When I was trying with gethostname() I got my PC name. ' Please help. I...

Knife ec2: need to avoid re-boostraping of server after hostname change

amazon-ec2,centos,chef,hostname,knife
I might be doing something wrong, but here is the situation. Standalone Chef server 12.3.0. CentOS 6.3 running on AWS. During execution of knife bootstrap I am applying hostname:default recipe to change server's FQDN along with some other recipes. Everything iseems to be fine. Chef server shows newly boostrapped instance,...

Host name showing (none) at login

linux,hostname
I am a newbie to Linux environment and building a Linux system from scratch using busy box. I created /etc/hosts and /etc/hostname file. But every time I start the system it shows (none)login: But I can change the hostname using hostname command after logging in. I don't want any FQDN...

zsh prompt and hostname

shell,zsh,hostname,zshrc
I use the following prompt in .zshrc: PROMPT="%{$fg[magenta]%}%n%{$reset_color%}@%{$fg[blue]%}%m %{$fg[yellow]%}%1~ %{$reset_color%}%# " When I open terminal I see this prompt: [email protected] ~ % Is it possible to drop the text "zoltan" in the hostname? I would like to make it look like this: [email protected] ~ % Any suggestion would be greatly...