centos7 use ifconfig command

來源:互聯網
上載者:User

標籤:centos7 ifconfig

[1]Default no install ifconfigcommand,if you want to use ifconfig need install net-tools

yum -y install net-tools
[[email protected] ~]# ifconfig eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500        inet 192.168.1.123  netmask 255.255.255.0  broadcast 192.168.1.255        inet6 fe80::215:5dff:fe01:a2c  prefixlen 64  scopeid 0x20<link>        ether 00:15:5d:01:0a:2c  txqueuelen 1000  (Ethernet)        RX packets 2986228  bytes 4432302967 (4.1 GiB)        RX errors 0  dropped 0  overruns 0  frame 0        TX packets 1541033  bytes 95355497 (90.9 MiB)        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536        inet 127.0.0.1  netmask 255.0.0.0        inet6 ::1  prefixlen 128  scopeid 0x10<host>        loop  txqueuelen 0  (Local Loopback)        RX packets 112  bytes 10970 (10.7 KiB)        RX errors 0  dropped 0  overruns 0  frame 0        TX packets 112  bytes 10970 (10.7 KiB)        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
[[email protected] ~]# systemctl stop NetworkManager[[email protected] ~]# systemctl disable NetworkManagerrm ‘/etc/systemd/system/multi-user.target.wants/NetworkManager.service‘rm ‘/etc/systemd/system/dbus-org.freedesktop.NetworkManager.service‘rm ‘/etc/systemd/system/dbus-org.freedesktop.nm-dispatcher.service‘

[2]grub2,對這我不太瞭解,興起的是ipv6我用不到,可以禁用掉

vim /etc/default/grub

GRUB_CMDLINE_LINUX="ipv6.disable=1 crashkernel=auto  vconsole.font=latarcyrheb-sun16 rd.lvm.lv=centos_maria    db/swap vconsole.keymap=us rd.lvm.lv=centos_mariadb/root rhgb quiet"

[[email protected] ~]# grub2-mkconfig -o /boot/grub2/grub.cfg Generating grub configuration file ...Found linux image: /boot/vmlinuz-3.10.0-123.el7.x86_64Found initrd image: /boot/initramfs-3.10.0-123.el7.x86_64.imgWarning: Please don‘t use old title `CentOS Linux, with Linux 3.10.0-123.el7.x86_64‘ for GRUB_DEFAULT, use `Advanced options for CentOS Linux>CentOS Linux, with Linux 3.10.0-123.el7.x86_64‘ (for versions before 2.00) or `gnulinux-advanced-d6e32a08-4535-4ae1-8220-c1f0d51464b3>gnulinux-3.10.0-123.el7.x86_64-advanced-d6e32a08-4535-4ae1-8220-c1f0d51464b3‘ (for 2.00 or later)Found linux image: /boot/vmlinuz-0-rescue-7f8cb19f06a84d6a939e964ca4edcaa7Found initrd image: /boot/initramfs-0-rescue-7f8cb19f06a84d6a939e964ca4edcaa7.imgdone

reboot 後生效!

本文出自 “西伯利亞·狼” 部落格,請務必保留此出處http://kernal.blog.51cto.com/8136890/1531612

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.