1. 关闭防火墙:
sudo ufw disable
2. 设置IPV4地址和网关:
ifconfig eth0 up %s netmask %s
route del default gw 192.168.110.1 eth0
route add default gw %s eth0
3. 设置IPV6地址和网关:
ip -6 addr add %s/%s dev eth0
ip -6 route add ::/0 via %s dev eth0 //特别是这一条,网上很多都是写错的,只有这个是可以通过三层VLAN跨网段ping通的。
正确的网址:http://ipv6.xjtu.edu.cn/conf/linuxconf.asp
错误的网址:http://blog.sina.com.cn/s/blog_51bc9ad40100rd84.html
4. 如何查看二进制文件:
hexdump -C eeprom.dat
5. 编译动态库:
gcc x.c y.c z.c -fPIC -shared -o libtest.so
6. fork无法分配共享内存:
echo "0" >> /proc/sys/vm/overcommit_memory
7. 按时间查看文件:
ls -ltr 或者ls -l | sort -r +7
8. 远程拷贝:
scp -r figure@192.168.115.151:/mnt/hgfs/figure-it/SNIP603S/SNIP603M/server/src/cdrom ./
9. 增加环境变量:
export PATH=$PATH:/usr/local
10. 删除环境变量:
unset PATH
11. 未完待续.....