Linux 2017-12-12 1th Week 2nd Lesson study notes

Source: Internet
Author: User
Tags clear screen


  • Fixed IP is configured to allow your system to surf the Internet and connect to your server remotely.

    Command:
    #ls "List directories or files under the current directory"

    #ip addr "To view your network card information"

    #dhclient "Automatically configure IP addresses for your virtual system"

    #ctrl +l "Clear Screen"

    #route-N "View network card Gateway"

    Ifcfg-nes33 "Virtual network card" Ifcfg-lo "loopback address"

    #vi/etc/sysconfig/network-scripts/ifcfg-ens33 "NIC configuration file"

    Press I to enter edit mode:
    Bootproto=dhcp "bootproto=static (change to dynamic IP switch to static IP)

    Onboot=no "Onboot=yes (changed to boot from boot)

    ipaddr=192.168.160.128 (IP value obtained by dhclient)

    netmask=255.255.255.0 (Subnet mask)

    gateway=192.168.160.2 (gateway address)

    dns1=119.29.29.29 (DNS server)

    Press ESC to exit
    Press:: Wq "Save and Exit"

    # "VI" "edit mode can modify the contents of the document, press ESC to exit the edit mode into the command mode input:": Wq "Save Exit"

    #systemctl Restart Network.service "Restart Network Service"

    #ifconfig "Viewing network card information"

    #ping www.qq.com "See if I can ping the network"

    If there's nothing else behind this line, it means you're on the Internet.

    Troubleshooting Network problems:

    Can not ping the outside network after the change, change the network mode,
    If NAT mode is changed to bridging mode, and vice versa.

    If you change the network mode to find or not ping,
    Use the Dhclient command to re-obtain the IP address, if you cannot ping the

    Recheck the network configuration file with the VI editor.
    #vi/etc/sysconfig/network-scripts/ifcfg-ens33 "NIC configuration file"

    (Small white Personal method Reference)
    Reconfigure the IP Restore virtual network editor to come again.
    Once again, no, it's over. The problem is naturally found ~ ~

Linux 2017-12-12 1th Week 2nd Lesson study notes

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.