linux
allankin
这个作者很懒,什么都没留下…
展开
-
linux 根据端口号查找对应进程的ID,操作进程
已经某个端口号被占用,如何根据端口号得到占用它的进程的ID呢 用lsof ,lsof在ubuntu下的安装命令为apt-get install lsof 若已知端口号为15000,则对应查找命令为lsof -i | grep 15000 本机显示结果为: host 3386 trinea 4u IPv4 16907 0转载 2012-11-14 08:53:33 · 1154 阅读 · 0 评论 -
putty 保存用户session
用putty登陆后,点击设置后,session中点击save。 这样可以保存在setting中的所有配置更改。原创 2012-11-18 16:24:46 · 4326 阅读 · 0 评论 -
Ubuntu安装后,用putty连接出现“network error connection refused”
安装ubuntu 10.10后,用putty尝试连接,报错:“network error connection refused” 原因没有安装ssh导致。 安装命令: sudo apt-get install openssh-server原创 2012-11-18 15:50:18 · 1033 阅读 · 0 评论 -
Prevent Putty session from going inactive
Prevent Putty session from going inactive [How to] Frequent users of putty should have encountered the Putty (inactive) problem. This happens because servers are usually configured to disconnect id翻译 2012-12-07 14:34:19 · 630 阅读 · 0 评论 -
Linux添加用户(user)到用户组(group)
将一个用户添加到用户组中,千万不能直接用: usermod -G groupA 这样做会使你离开其他用户组,仅仅做为 这个用户组 groupA 的成员。 应该用 加上 -a 选项: usermod -a -G groupA user (FC4: usermod -G groupA,groupB,groupC user) -a 代表 append, 也就是 将自己添加到转载 2012-12-08 15:02:52 · 641 阅读 · 0 评论 -
用screen命令以后台方式执行程序
后台方式:用screen命令 1. cd到启动脚本目录。 输入:screen 输入:脚本执行语句 2. 屏幕退出,不终止程序: 按Ctrl+a键,放开后,再按下d ,切断与这个屏幕的联系。这时你可以关闭终端。 当你要再次看一下程序的运行情况按以下步骤做 输入:screen -ls 3. 重新建立与程序运行所在屏幕的联系 输入:screen -r screen号原创 2012-12-10 09:01:20 · 872 阅读 · 0 评论 -
history 命令显示执行时间
linux下显示历史命令的执行时间 默认的bash设置中,在使用history命令查看历史命令的时候,不显示命令执行的时间,通过增加 HISTTIMEFORMAT变量可以时间记录历史命令的功能。 设置方法: 在/etc/profile 里面加入下面2行就可以了,这样可以记录每个用户执行的命令了。 Shell代码 export HISTTIMEFORMAT="%转载 2012-12-10 10:08:09 · 737 阅读 · 0 评论 -
linux下查看cpu及操作系统信息
# uname -a Linux ylin-ThinkPad 2.6.32-37-generic #81-Ubuntu SMP Fri Dec 2 20:35:14 UTC 2011 i686 GNU/Linux 查看当前操作系统内核信息。如有i386或i686字样,则操作系统内核为32位,如有x686或x86_64,则操作系统内核为64位。 # cat /etc/issue Ubun转载 2012-12-22 10:18:41 · 727 阅读 · 0 评论