which
whereis
Linux常用命令全集
http://linux.chinaitlab.com/special/linuxcom/Index.html
vi命令一lan表
http://www.21ds.net/article/23/308
pwd
查看当前路径
find / -name profile
查找 指定 名的 。。
linux修改启动项
查看启动项: chkconfig --list
增加启动项: chkconfig –add mysqld start
Chkconfig –add httpd start
Chkconfig –level 5 httpd on
Chkconfig –level 5 iptables off
Chkconfig –level 5 mysqld off
linux 启动项 2007-10-29 11:36 修改 /etc/rc.local 就可以了
例如:
#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.
touch /var/lock/subsys/local
echo 250 32000 100 128 > /proc/sys/kernel/sem
echo 2147483648 > /proc/sys/kernel/shmmax
echo 4096 > /proc/sys/kernel/shmmni
echo 2097152 > /proc/sys/kernel/shmall
/usr/local/apache/bin/apachectl start
Linux查看端口使用状态、关闭端口方法
1. 可以通过"~$ netstat -anp" 来查看哪些端口被打开。
(注:加参数'-n'会将应用程序转为端口显示,即数字格式的地址,如:nfs->2049, ftp->21,因此可以开启两个终端,一一对应一下程序所对应的端口号)
(注:加参数'-n'会将应用程序转为端口显示,即数字格式的地址,如:nfs->2049, ftp->21,因此可以开启两个终端,一一对应一下程序所对应的端口号)
2)或者关掉对应的应用程序,则端口就自然关闭了,如:
"~$ kill -9 PID" (PID:进程号)
如: 通过"~$ netstat -anp | grep ssh"
有显示: tcp 0 127.0.0.1:2121 0.0.0.0:* LISTEN 7546/ssh
则: "~$ kill -9 7546"
(可通过"~$ chkconfig"查看系统服务的开启状态)
"~$ kill -9 PID" (PID:进程号)
如: 通过"~$ netstat -anp | grep ssh"
有显示: tcp 0 127.0.0.1:2121 0.0.0.0:* LISTEN 7546/ssh
则: "~$ kill -9 7546"
(可通过"~$ chkconfig"查看系统服务的开启状态)
ls -la
查看权限
ps -aux |grep jboss
//查看jboss服务
ls -t
//按更改时间顺序查看
less 文件名
//查看 文本类文件
相当于 window的 type
日志查看:
last命令 ast root
lastlog
who
w