Site Tools


server:linux_network_commands

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
server:linux_network_commands [2012/12/02 22:48] – ashleyserver:linux_network_commands [2015/11/01 11:19] (current) – ashley
Line 7: Line 7:
  
 Assign IP: ifconfig eth0 192.168.1.2 Assign IP: ifconfig eth0 192.168.1.2
 +
 +===== Change to dhcp: =====
 +
 +  vi /etc/sysconfig/network-scripts/ifcfg-eth0
 +
 +  DEVICE=eth0
 +  BOOTPROTO=dhcp
 +  HWADDR=00:19:D1:2A:BA:A8
 +  ONBOOT=yes
 +
 +===== set to static =====
 +  DEVICE="eth0"
 +  BOOTPROTO="static"
 +  HWADDR="00:0C:29:D7:CD:F2"
 +  IPADDR=192.168.2.9
 +  NETMASK=255.255.255.0
 +  GATEWAY=192.168.2.1
 +  ONBOOT="yes"
 +
 +Save and close the file. Just restart network service:
 +  /etc/init.d/network restart
 +
 +Show IP address
 +  ip addr show eth0
  
 Ping: ping -c 3 192.168.1.1 Ping: ping -c 3 192.168.1.1
Line 42: Line 66:
  
 Read more: http://www.whatismyip.com/faq/linux-ip-commands.asp#ixzz29upjcTuF Read more: http://www.whatismyip.com/faq/linux-ip-commands.asp#ixzz29upjcTuF
 +
 +===== how to reduce RAM consumption (disable printing, smartcards, etc.) =====
 +
 +  chkconfig --list | grep "\bon\b"
 +
 +should show you the list of things that are currently set to start on boot. You can review those and
 +
 +  chkconfig $servicename off
  
  
 +=====Check Linux Install=====
 +  cat /etc/*-release
server/linux_network_commands.1354488497.txt.gz · Last modified: (external edit)