linux下常用命令

    find /etc -name httpd.conf    在/etc下查找名为httpd.conf文件

    df -m         查看硬盘的总容量,已用容量等,单位MB

    du -m  [/home]      列出当前[/home]下目录与文件所占容量,单位MB

    

    fdisk     硬盘分区工具

    mount -t vfat /dev/fd0 /mnt/floppy    装载/dev/fd0以-t格式vfat到/mnt/floppy目录下

    fdisk -l    查看u盘名称

    ps -aux   列出所有程序,包括用户,tty

    kill -9 2380    杀死PID为2380程序

    tar -zcvf directory.tar.gz directory    将目录打包并用gzip压缩

    tar -zxvf directory.tar.gz         解开包并解压缩

    ls | tr '' ' '    替换,用' '替换'',即按行展开显示

    ifconfig eth0 up

    ifconfig eth0 down

    ifconfig eth0 add/del 33ffe:3240:8000:1005::2164   为网卡eth0配置/删除IPv6地址-

    ifconfig eth0 192.168.120.56  配置网卡eth0IPv4地址-

    ifconfig eth0 192.168.120.56 netmask 255.255.255.0 broadcast 192.168.120.255   配置网络信息

    ifconfig eth0 arp        开启网卡eth0的arp协议

    ifconfig eth0 -arp     关闭网卡eth0的arp协议

    

原文地址:https://www.cnblogs.com/wzhe/p/6001792.html