Laote's Notes

向前进就会获得信念

How to find IP address under linux

Posted at 8/08/2009 08:48:00 AM
Type the following command at a shell prompt:

ifconfig -a | perl -ne 'if ( m/^\s*inet (?:addr:)?([\d.]+).*?cast/ ) { print qq($1\n); exit 0; }'
Labels: Linux

No comments:

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)

About Me

My photo
laote
View my complete profile

Links

  • 古诗词文章索引

Search This Blog

Labels

  • Algorithm (16)
  • C++ (30)
  • Java (8)
  • Linux (9)
  • Network (4)
  • Other (3)
  • SQL (4)
  • 养身 (4)
  • 电脑 (2)

Blog Archive

  • ►  2017 (1)
    • ►  October (1)
  • ►  2013 (2)
    • ►  March (2)
  • ►  2011 (31)
    • ►  October (4)
    • ►  September (4)
    • ►  August (2)
    • ►  July (9)
    • ►  June (6)
    • ►  April (3)
    • ►  February (3)
  • ►  2010 (8)
    • ►  September (1)
    • ►  August (2)
    • ►  May (2)
    • ►  February (1)
    • ►  January (2)
  • ▼  2009 (15)
    • ►  December (1)
    • ▼  August (2)
      • Install office 2007 in ubuntu
      • How to find IP address under linux
    • ►  July (2)
    • ►  June (7)
    • ►  May (1)
    • ►  April (1)
    • ►  March (1)
  • ►  2008 (1)
    • ►  June (1)
  • ►  2007 (1)
    • ►  April (1)

Total Pageviews

Picture Window theme. Powered by Blogger.