Yun's board name

Sorry if it has been answered before, I wasn't able to find it.

Is there anyway to read the Yun's board name from within a sketch? How?

Thanks!

Run the linux program "hostname"

Federico I'm completely new to Linux, so could you be a little more explicit, like telling me where to find the "hostname" program and how to run it? Sorry if i'm being incovinient

Many thanks in advance

run a ssh console to connect to your yun (in windows or linux use putty)
it will ask a username and password.
username is root
pasword is what you configured it like.
type hostname

Best regards
Jantje

@simon, you can do what @Jantje said and you can use the Process class in a sketch and execute "hostname" like this

void runHostname() {
  Process p;
  p.begin("hostname");
  p.run();

  while (p.available()>0) {
    char c = p.read();
    Serial.print(c);
  }
  Serial.flush();
}

Dear Jantje & Federico, many thanks for your suggestions.

For those readers as Linux illiterate as myself please find attached the whole sketch:

YunBoardName.ino (882 Bytes)