1.查看文件末尾
tail 文件路径
2. 查看系统资源情况
top
q退出
3.查看操作系统
cat /etc/issue
4. 查看主机名
hostname
5. 查看所有分区
fdisk -l
6. 文档前显示行号
cat -n 文件
7. 分页显示
命令 | more
eg: sysctl -a |more
8. 查看service
chkconfig -l
YaST2中看 yast
9. 查看用户
cat /etc/passwd could change the password
or ls /home/
route -n # 查看路由表
ps -ef # 查看所有进程
ifconfig # 查看所有网络 接口的属性
df -h # 查看各分区使用情况
查看PID: ps -ef 或例如 netstat -anp|grep 1099
杀进程: kill pid 杀不掉则 kill -9 pid
设置环境变量:
gedit /etc/profile
在文件末尾加上:
JAVA_HOME=/opt/ibm/java2xxx
PATH=$JAVA_HOME/bin:$PATH
export JAVA_HOME PATH
保存文件 然后logout一下 登陆后 输入 source /etc/profile 即可
ll <PATH> 查看文件夹
rm -rf <filename>
更改单个文件名: mv 123.file 234.file
运行脚本命令 & >run.log 使脚本在后台运行,并把屏幕输出存入run.log
从根开始查找文件: find /. -name xxxx
r: read
w:write
x: excute
chmod 777 name.file name.file 属性变为 rwxrwxr-- (111 111 100)
chmod +x name.file name.file 属性都加 x 即owner,group,other 都可执行
chown -R seattle common/ 递归地改变common文件夹下所有文件,使其owner都为seattle
Windows 向 Linux 传输文件:
1. filezilla
2. Linux 里面用 mount 命令
3. vsftpd