[Ubuntu] How to find your machine's name

Solved
zzzer Posted messages 938 Status Member -  
zzzer Posted messages 938 Status Member -
Hello,

I am on Ubuntu and I need to know the name of my machine (in order to perform ssh and then scp).

How can I do this?

Thanks in advance.

--
Don't forget to mark the discussion as resolved as soon as it's the case! -> At the top of the page, Status: Resolved
Also pay attention to properly respect the 6th rule of the charter:
Write messages in clear language without abbreviations, telegram-style or SMS mode
Configuration: Linux Ubuntu 8.04 Firefox 3.0.1

3 answers

  1. jipicy Posted messages 40842 Registration date   Status Moderator Last intervention   4 898
     
    Hello,
    hostname
    ;-))

    --
    JP - Penguin Breeder -
    Do your part for the environment, close your windows and adopt a penguin.
    17
    1. zzzer Posted messages 938 Status Member 181
       
      Actually, I don't think my machine has the same name on the network...
      Because when I do the scp with the name returned by hostname, it doesn't recognize it!


      --
      Don't forget to mark the discussion as resolved as soon as it is! -> At the top of the page, Status: Resolved
      Also, be careful to comply with the 6th rule of the charter:
      Write messages in clear language without abbreviation, telegraphic style, or SMS mode
      0
    2. zzzer Posted messages 938 Status Member 181
       
      Hum, well...
      But it's messing up:
      florian@RSS00091:/var/www$ scp shakur florian@florian-desktop:shakur ssh: connect to host florian-desktop port 22: No route to host lost connection

      --
      Don't forget to mark the discussion as resolved as soon as it's done! -> At the top of the page, Status: Resolved
      Also, be careful to respect the 6th rule of the charter:
      Write messages in clear language without abbreviations, telegraphic style, or SMS mode
      0
  2. jipicy Posted messages 40842 Registration date   Status Moderator Last intervention   4 898
     
    Do you have a name server on your network? Or are your machines listed in "/etc/hosts" for Linux?

    --
    JP - Penguin breeder -
    Do something for the environment, close your windows and adopt a penguin.
    0
    1. zzzer Posted messages 938 Status Member 181
       
      Do you have a name server on your network?
      I don't know >_<

      Or are your machines listed in "/etc/hosts" for Linux?
      No idea!

      I just know that I'm connected to my company's network, but that's it...

      Well, I see I can't help you help me, so I will try to tinker on my own as best as I can...


      --
      Don't forget to mark the discussion as resolved as soon as it is the case! -> At the top of the page, Status: Resolved
      Also, please make sure to respect the 6th rule of the charter:
      Write messages in clear language without abbreviations, telegraphic style, or SMS mode
      0
  3. zzzer Posted messages 938 Status Member 181
     
    Well, I finally achieved my goal (which was to do an scp).
    I typed
    sudo scp -r florian@intratest:shakur .
    and it finally worked.
    Thank you for your help jipicy!
    And have a good afternoon.

    --
    Don't forget to mark the discussion as resolved as soon as it's done! -> At the top of the page, Status: Resolved
    Also, please be careful to respect rule 6 of the charter:
    Write messages in clear language without abbreviations, telegraphic style, or SMS mode
    0