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开机启动

posted @ 2014-09-16 21:04  BT_lulu  阅读(484)  评论(0编辑  收藏  举报