Linux 目录结构及特殊文件详解
发布日期:2021-05-12 17:21:37 浏览次数:23 分类:精选文章

本文共 4107 字,大约阅读时间需要 13 分钟。

Linux������������������

1. /(���)������

���������������������������������������/������������������

  • /bin������������������������������������������������������ ls���mv ���������������������������������������

  • /sbin��������������������������������������������������������� iptables���ifconfig���init ������������������������������������

  • /dev������������������������������������������������������������ /dev/cdrom��������� /dev/sda1 ������

  • /tmp��������������������������������������������� 1777���������������������������������������

  • /home���������������������������������������������������������

  • /boot���������������������������������������������

  • /lib��������� Linux ������������������������ .so���lib* ������������������������������

  • /mnt���������������������������������������������U ���������������������������

  • /opt���������������������������������������������������������������

  • /media������������������������������������������

  • /root���������������������������������

  • /sys��������������������������� sysfs ���������������������������������������������

  • /etc���������������������������������������������������������������������������

  • /usr��� ������������������������������������������������������������������������������������������������ Unix ������������������������������������������������������������������������ ftp���telnet ������������ /usr/local ���������������������������������

2. ������������������

1. ������������������

Red Hat ���������

������������������/etc/sysconfig/network-scripts/ifcfg-eth0������������������������������

  • DEVICE=eth0���������������
  • TYPE=Ethernet���������������
  • ONBOOT=yes���������������
  • NM_CONTROLLED=yes��������� NetworkManager
  • BOOTPROTO=none��������� IP ������
  • IPADDR=10.0.0.8���IP ������
  • NETMASK=255.255.255.0���������������
  • DNS2=4.4.4.4��������� DNS
  • GATEWAY=10.0.0.2���������
  • DNS1=10.0.0.2��������� DNS

���������������������

  • NM_CONTROLLED������������������������ NetworkManager ������������������
  • BOOTPROTO��������������� IP ������������������ dhcp��������������� static���������������������������

2. DNS ������������������

Red Hat ���������

������������������/etc/resolv.conf��������������� DNS ������������������

  • ��������������� DNS ���������������������������������������
  • ������������������������������������������
    service network restart
  • ������������/etc/hosts ���������������������/etc/resolv.conf ������������������������������

3. ��������� DNS ������������

������������������/etc/hosts������������������ DNS ���������������������������������������

  • ���������
    192.168.1.1 localhost
    192.168.1.1 www.baidu.com
  • ���������������������������������������������������������������������������������������

4. ���������������������Ubuntu ���������

������������������/etc/network/interfaces������������������������

  • ���������������DHCP������
    auto eth0
    iface eth0 inet dhcp
  • ���������������
    auto eth0
    iface eth0 inet static
    address 192.168.0.7
    netmask 255.255.255.0
    gateway 192.168.0.254
    dns-nameservers 12.34.56.78 12.34.56.79
  • ������ DNS ������������������ resolv.conf ������������������

���������������������Ubuntu���

  • ���������������������������
    service networking restart
  • ���������������������������
    ifdown eth0
    ifup eth0
  • ���������������������������
    ifconfig eth0 down
    ifconfig eth0 up

  • 3. /usr ������������

    15.1���usr ������������

    ������ Unix ������������������������������������������������������������ Header��������������������������������������������������������������������������������� /home������������usr/local ���������������������������

    15.2���usr ������������

    • /usr/bin��������������������������������� gcc������������ firefox ������
    • /usr/include���������������������������������
    • /usr.lib���������������������������������
    • /usr/local���������������������������������������������������
    • /usr/X11R6���X ������������������������������������������������������������ kernel ���������������
    • /usr/src���������������������������������������������
    • /usr/tmp���������������������������������

    4. ������������������

    • DNS ��������������������� /etc/hosts ���������resolv.conf ���������������������������
    • ������������������������������������������������������������������ ifdown & ifup���
    上一篇:ln软连接和硬链接
    下一篇:vnc以及xfce安装

    发表评论

    最新留言

    留言是一种美德,欢迎回访!
    [***.207.175.100]2025年05月03日 14时20分56秒