常用的 linux/mac terminal command:# pwd
显示自己所在的 directory# ps -ef
显示正在执行的 process,之后再用 kill 去杀掉它# rm -r
删除目录及其内的档案# chmod -R, chown -R, chgrp -R
更新目录和其内的档案的权限、拥有者和群组# top
显示 cpu & memory 的使用情况# ssh <username>@<host> -p <port>
用 ssh 连去其他主机# scp -p <port> <username>@<host>:<remote file> <local dir>
透过 ssh 下载其他主机的档案# /etc/init.d/<service name> start/stop/restart
开始/停止/重启某项 service# ifconfig
显示 ip 等资料# tail -n <number> <file>, head -n <number> <file>
显示 file 尾/头 number 行列的资料
--------------------------------------------------------------------------------
以下是 Ubuntu 的笔记:Host file location: /etc/hostsset static ip: /etc/network/interfacesrestart network servies: /etc/init.d/networking restartsamba config location: /etc/samba/smb.confretstart samba: restart smbd--------------------------------------------------------------------------------
写下来时发觉原来 command 不难,找出 config file 的位置才是最麻烦的。Ubuntu 12.04 安装 PostgreSQL 9.1 及 rails 的设置Ubuntu / Xubuntu : 读写 exFAT 文件系统相关资讯 Note 本文评论 查看全部评论 (0)