你好,游客 登录 注册 搜索
背景:
阅读新闻

Note: 简单有用的 linux commands

[日期:2012-08-25] 来源:Linux社区  作者:gofaces [字体:大 中 小]

常用的 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/hosts

set static ip: /etc/network/interfaces

restart network servies: /etc/init.d/networking restart

samba config location: /etc/samba/smb.conf

retstart samba: restart smbd

--------------------------------------------------------------------------------
写下来时发觉原来 command 不难,找出 config file 的位置才是最麻烦的。

linux
相关资讯       Note 
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款