Tuto terminal : Différence entre versions

De Asso Val Libre
Aller à : navigation, rechercher
Ligne 9 : Ligne 9 :
 
   64 bytes from localhost (127.0.0.1): icmp_seq=1 ttl=64 time=0.036 ms
 
   64 bytes from localhost (127.0.0.1): icmp_seq=1 ttl=64 time=0.036 ms
 
   64 bytes from localhost (127.0.0.1): icmp_seq=2 ttl=64 time=0.056 ms
 
   64 bytes from localhost (127.0.0.1): icmp_seq=2 ttl=64 time=0.056 ms
 +
 +
Une machine doit toujours répondre à un ping sur localhost (car localhost=="moi-même")
 +
 +
Si la machine s'appelle saint-roch,
 +
  Ping saint-roch
 +
  PING saint-roch (127.0.1.1) 56(84) bytes of data.
 +
  64 bytes from saint-roch (127.0.1.1): icmp_seq=1 ttl=64 time=0.038 ms
 +
  64 bytes from saint-roch (127.0.1.1): icmp_seq=2 ttl=64 time=0.054 ms

Version du 5 janvier 2021 à 15:45


Pour mémoriser une commande, on peut définir un alias

 alias Ping="ping -c 2"
 Ping localhost
 PING localhost (127.0.0.1) 56(84) bytes of data.
 64 bytes from localhost (127.0.0.1): icmp_seq=1 ttl=64 time=0.036 ms
 64 bytes from localhost (127.0.0.1): icmp_seq=2 ttl=64 time=0.056 ms

Une machine doit toujours répondre à un ping sur localhost (car localhost=="moi-même")

Si la machine s'appelle saint-roch,

 Ping saint-roch
 PING saint-roch (127.0.1.1) 56(84) bytes of data.
 64 bytes from saint-roch (127.0.1.1): icmp_seq=1 ttl=64 time=0.038 ms
 64 bytes from saint-roch (127.0.1.1): icmp_seq=2 ttl=64 time=0.054 ms