User login

Useful Linux Commands vol. 1

Linux - General Command Lines

Note: You MUST be at the ROOT user to make/save any changes. Linux users, your distribution will determine the location of your network config file which will need to be updated and saved in order for the changes to remain in effect after rebooting. Network cards are referred to as eth0, eth1, eth2, etc based on their position on the PCI bus.

Resolution

  • Display Current Config for all NIC's: ifconfig
  • Display Current Config for eth0: ifconfig eth0
  • Assign IP: ifconfig eth0 192.168.1.2
  • Assign IP/Subnet: ifconfig eth0 192.168.1.2 netmask 255.255.255.0
  • Assign Default Gateway: route add default gw 192.168.1.1
  • Assign multiple IP's: ifconfig eth0:0 192.168.1.2
  • Assign second IP: ifconfig eth0:1 192.168.1.3
  • Disable network card: ifconfig eth0 down
  • Enable network card: ifconfig eth0 up
  • View current routing table: route "or" route -n
  • View arp cache: arp "or" arp -n
  • Ping: ping -c 3 192.168.1.1
  • Trace Route: traceroute www.agaricdesign.com
  • Trace Path: tracepath www.agaricdesign.com
  • DNS Test: host www.agaricdesign.com
  • Advanced DNS Test: dig www.agaricdesign.com
  • Reverse Lookup: host 66.11.119.69
  • Advanced Reverse Lookup: dig -x 66.11.119.69

I can only take credit for copying this info from http://whatismyip.com, a useful site. Especially if you are giving telephone tech support to a non pc savvy person, like say, your parents and you quickly and painlessly need them to tell you their IP....

Searched words: 
find ip linux commands

Comments

Post new comment

The content of this field is kept private and will not be shown publicly.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.
  • You can use Markdown syntax to format and style the text. Also see Markdown Extra for tables, footnotes, and more.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img> <blockquote> <small> <h2> <h3> <h4> <h5> <h6> <sub> <sup> <p> <br> <strike> <table> <tr> <td> <thead> <th> <tbody> <tt> <output>
  • Lines and paragraphs break automatically.

More information about formatting options

By submitting this form, you accept the Mollom privacy policy.