build-in命令可以查看缓存的“命令->程序路径”列表[root@localhost~]#hash
hitscommand
1/bin/hostname
1/sbin/iptables
2/usr/bin/man
1/bin/ls
1/usr/local/bin/python
分类:
系统相关 时间:
2014-08-26 11:54:56
阅读次数:
247
#!/bin/shIPT="/sbin/iptables"/bin/echo "1" > /proc/sys/net/ipv4/ip_forward/sbin/modprobe ip_tables/sbin/modprobe iptable_filter/sbin/modprobe iptable_...
分类:
其他好文 时间:
2014-08-25 22:39:44
阅读次数:
309
方法一:file/sbin/init或file/bin/ls结果如下[root@localhost~]#file/sbin/init/sbin/init:ELF32-bitLSBsharedobject,Intel80386,version1(SYSV),dynamicallylinked(usessharedlibs),forGNU/Linux2.6.18,stripped[root@localhost~]#file/bin/ls/bin/ls:ELF32-bitLSBexecutable..
分类:
系统相关 时间:
2014-08-25 19:32:05
阅读次数:
284
前言:今天我们就根据BusyBox+linux内核定制一个属于自己的Linux,还可以加上dropbear和nginx来实现远程登录和web服务器功能。要想定制一个小型的Linux系统首先要对Linux开机启动流程有所了解。POST-->BootSequence(MBR)-->BootLoader-->kernel-->/sbin/initPOST:..
分类:
系统相关 时间:
2014-08-24 19:35:03
阅读次数:
398
一、Linux各目录的作用:目录名目录作用/bin/存放系统命令的目录,普通用户和超级用户都可以执行。不过放在/bin下的命令在单用户模式下也可以执行/sbin/保存和系统环境设置相关的命令,只有超级用户可以使用这些命令进行系统环境设置,但是有些命令可以允许普通用户查看/usr/bin/存放系统命令...
分类:
系统相关 时间:
2014-08-24 11:37:12
阅读次数:
342
本文介绍如何在CentOS环境下配置一个简单的SNMP服务
软件安装
切换到系统管理员帐户
安装snmp
确认snmp代理已安装
rpm -q net-snmp
如果未安装,安装snmp
yum install net-snmp
设置开机自动运行snmp
/sbin/chkconfig snmpd on配置snmp
修改配置文件
将原来的配...
分类:
其他好文 时间:
2014-08-22 14:31:29
阅读次数:
223
最近在折腾Linux服务器,配置环境时,安装php的一个拓展,明明编译成功了,就是加载不进去,phpinfo不显示,查看错误日志是显示加载失败,没权限==,配置ftp程序也会有意想不到的问题,搞了好久,才发现是selinux的问题,于是将其关闭: 关闭:/usr/sbin/setenforce .....
分类:
系统相关 时间:
2014-08-22 10:45:05
阅读次数:
243
一 :获取单个网卡的IPv4地址,方法如下:方法一:$/sbin/ifconfig ethX | awk '/inet addr/ {print $2}' | cut -f2 -d ":" 方法二:$/sbin/ifconfig ethX | awk '/inet addr/ {print $2}....
分类:
其他好文 时间:
2014-08-21 19:08:44
阅读次数:
161
crontab -e* * * * * /root/start.sh*/20 * * * * /usr/sbin/ntpdate 0.centos.pool.ntp.org >>/root/ntp.logvi /root/start.sh#!/bin/bash#判断进程是否存在,如果不存在就启动它P...
分类:
其他好文 时间:
2014-08-20 12:12:12
阅读次数:
199
没有发现解决方案:可用sudo /sbin/yast2用命令行的GUI替代。。。虽然差不多决定一会update一下试试
分类:
其他好文 时间:
2014-08-16 23:45:11
阅读次数:
245