• Linux命令


    echo 1 > /proc/sys/net/ipv4/ip_forward

    Linux下开启路由功能

    /etc/init.d/networking restart   Linux重启网络

    ifconfig eth0 10.1.1.100 netmask 255.255.255.0   给网卡配IP地址

    route add default gw 10.1.1.254   配默认网关

    netstat –r   查看路由表

    /etc/resolv.conf   修改dns服务器

    ifconfig –a   查看网卡

    ifconfig eth0 up   开启eth0

    ifconfig eth0 up 192.168.1.100   给eth0配置地址

    dhclient eth0   将eth0设置为dhcp client

    whereis nikto   显示程序的位置

    locate nikto   显示包含nikto的文件名或目录名及路径

    apt-cache search nikto   搜索本机是否安装了nikto

    查看进程

    ps –aux

    ps –ef

    查看端口对应的进程

    netstat –antu

    查看端口与进程的关系

    lsof –i tcp:port

    查看系统版本

    uname –a

    cat /etc/redhat-release

    cat /proc/version

    cat /etc/issue

    | grep   字符串查找

    service 服务名 status   查看服务状态

    sudo passwd root   改root密码

    systemctl start httpd.service   启动Apache

    systemctl stop httpd.service   停止Apache

    systemctl restart httpd.service   重启Apache

    systemctl enable httpd.service   设置Apache开机启动

  • 相关阅读:
    Markdown的简介(转)
    写在二月的尾巴上
    The Pragmatic Programmer 读书笔记
    C/C++语言的一些精简归纳
    一般常用设计模式及原则的思想小结
    常用UML模型简要小结
    LeetCode 101. Symmetric Tree
    LeetCode 100. Same Tree
    LeetCode 99. Recover Binary Search Tree
    线索二叉树的建立与遍历
  • 原文地址:https://www.cnblogs.com/btlulu/p/3975815.html
Copyright © 2020-2023  润新知