Categories

  • Databases
  • Hardware
  • Mac
  • Networking
  • Programming
  • Security
  • Site News
  • Software
  • Unix
  • Websites
  • Windows

Archives

Search

Skip to content

Hardware Tutorials

Tutorials on hardware, software, operating systems and more.

Widgets

Tag: vagrant

Posted on 22 June 201617 February 2017 in Software, Unix

Get your default gateway from the terminal

If you are inside a Vagrant box and want to SSH to the host machine, you will need to get the default gateway. Or, maybe you just need the default gateway for a completely different reason. Either way, the following command should do it.

netstat -rn | grep "^0.0.0.0 " | cut -d " " -f10

This is really useful if you don’t have ifconfig installed.

linux ssh vagrant virtual machine
Proudly powered by WordPress | Theme: Hew by WordPress.com.