Common linux commands 2

Source: Internet
Author: User

Sh code
Last login: Sat Sep 10 14:57:04 2011 from 192.168.0.142
[Root @ oplinux ~] # Ifconfig
Eth0 Link encap: Ethernet HWaddr 00: 0C: 29: 3A: 22: CA
Inet addr: 192.168.91.128 Bcast: 192.168.91.255 Mask: 255.255.255.0
Inet6 addr: fe80: 20c: 29ff: fe3a: 22ca/64 Scope: Link
Up broadcast running multicast mtu: 1500 Metric: 1
RX packets: 221 errors: 0 dropped: 0 overruns: 0 frame: 0
TX packets: 146 errors: 0 dropped: 0 overruns: 0 carrier: 0
Collisions: 0 FIG: 1000
RX bytes: 36945 (36.0 KiB) TX bytes: 20636 (20.1 KiB)
Interrupt: 67 Base address: 0x2000
 
Lo Link encap: Local Loopback
Inet addr: 127.0.0.1 Mask: 255.0.0.0
Inet6 addr: 1/128 Scope: Host
Up loopback running mtu: 16436 Metric: 1
RX packets: 2576 errors: 0 dropped: 0 overruns: 0 frame: 0
TX packets: 2576 errors: 0 dropped: 0 overruns: 0 carrier: 0
Collisions: 0 txqueuelen: 0
RX bytes: 3710212 (3.5 MiB) TX bytes: 3710212 (3.5 MiB)
 
[Root @ oplinux ~] # Route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.91.0*255.255.255.0 U 0 0 0 eth0
169.254.0.0*255.255.0.0 U 0 0 0 eth0
Default 192.168.91.2 0.0.0.0 UG 0 0 0 eth0
[Root @ oplinux ~] # Cat/etc/sysconfig/network-scripts/ifcfg-
Ifcfg-eth0 ifcfg-lo
[Root @ oplinux ~] # Cat/etc/sysconfig/network-scripts/ifcfg-eth0
# Advanced Micro Devices [AMD] 80c970 [PCnet32 LANCE]
DEVICE = eth0
ONBOOT = yes
# HWADDR = 00: 0C: 29: 3A: 22: CA
# IPV6ADDR =
# IPV6PREFIX =
HWADDR = 00: 0c: 29: 3a: 22: ca
TYPE = Ethernet
USERCTL = yes
IPV6INIT = no
PEERDNS = yes
BOOTPROTO = dhcp
[Root @ oplinux ~] # Cat/etc/resolv. conf
; Generated by/sbin/dhclient-script
Search localdomain
Nameserver 192.168.91.2
[Root @ oplinux ~] # Cat/etc/host. conf
Order hosts, bind
[Root @ oplinux ~] # Cat/etc/sysconfig/network
NETWORKING = yes
NETWORKING_IPV6 = yes
HOSTNAME = oplinux.hehaibo.com
[Root @ oplinux ~] # Cat/etc/hosts
# Do not remove the following line, or various programs
# That require network functionality will fail.
127.0.0.1 oplinux.hehaibo.com oplinux localhost. localdomain localhost
: 1 localhost6.localdomain6 localhost6
[Root @ oplinux ~] # Cat/etc/inetd. conf
Cat:/etc/inetd. conf: No file or directory
[Root @ oplinux ~] # Cat/etc/rc. d/rc. local
#! /Bin/sh
#
# This script will be executed * after * all the other init scripts.
# You can put your own initialization stuff in here if you don't
# Want to do the full Sys V style init stuff.
 
Touch/var/lock/subsys/local
# Rotue add-host 192.168.157.128 gw 192.168.157.2 dev eth0
# Route add-net 192.168.157.0 netmask 255.255.255.0 gw 192.168.157.2 dev eth0
[Root @ oplinux ~] #

Author "hehaibo"
 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.