Skip to content

Fredrik Rambris

What is going on?

Archives

Categories

  • DIY (8)
  • food (1)
  • Hardware (9)
  • Music (1)
  • Personal (18)
  • Photography (2)
  • Projects (27)
    • Network cabinet (3)
    • Speakers and speakerstand (22)
    • Workbench (2)
  • Random (8)
  • Site updates (16)
  • Software (23)
  • Sysadmin (14)
  • Uncategorized (1)

My other homes

  • Github Github
  • GitLab GitLab
  • Google+ Google+
  • Instagram Instagram
  • Keybase Keybase
  • LinkedIn LinkedIn
  • SoundCloud SoundCloud
  • Twitter Twitter
  • YouTube YouTube

Meta

  • Register
  • Log in
  • Entries feed
  • Comments feed
  • WordPress.com

Tag: oneliner

One-liner of the day: Get your primary IP address

Get the IP adress of the interface where the default route is

ifconfig $( ip route | grep ^default | awk '{ print $NF }' ) | grep "inet " | awk '{ print $2 }'
Posted on September 8, 2016Categories SysadminTags linux, onelinerLeave a comment on One-liner of the day: Get your primary IP address
Create a free website or blog at WordPress.com.
Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy
  • Follow Following
    • Fredrik Rambris
    • Already have a WordPress.com account? Log in now.
    • Fredrik Rambris
    • Customize
    • Follow Following
    • Sign up
    • Log in
    • Report this content
    • View site in Reader
    • Manage subscriptions
    • Collapse this bar