[转] Linux下ctrl 常用组合键

2012年4月27日 没有评论 37 人阅读   

 

在linux中,常常用到ctrl和其他按键组合,常用的有哪些及意义呢?
Ctrl-c 结束正在运行的程序【ping、telnet等】
Ctrl-d 结束输入或退出shell
Ctrl-s 暂停屏幕输出
Ctrl-q 恢复屏幕输出
Ctrl-l 清屏,【是字母L的小写】等同于Clear
分类: Linux, 杂项 标签:

linux下backspace/home/end的一些知识点

2012年4月19日 没有评论 54 人阅读   

在使用linux时会发现,ssh的时候不能使用backspace(可以使用Ctrl+Backspace),但在shell环境下却可以

与之类似的现象是mysql 5.0 client不能使用home/end(参考http://bugs.mysql.com/bug.php?id=315

 

linux下输入组件主要有:libedit、readline

readline: The GNU Readline library provides a set of functions for use by applications that allow users to edit command lines as they are typed in. Both Emacs and vi editing modes are available. The Readline library includes additional functions to maintain a list of previously-entered command lines, to recall and perhaps reedit those lines, and perform csh-like history expansion on previous commands.

 

libedit: non-GPL replacement for readline library. A spin-off from NetBSD code. Aim is for 100% readline API compatibility.

 

readline使用可以参考:
http://linuxtoy.org/archives/readline.html

ssh下的解决办法:
http://skykiss.blog.51cto.com/blog/2892603/769771

勾选如下两项:

分类: Linux, 杂项 标签: , ,

VMware中安装ubuntu server

2012年4月19日 没有评论 49 人阅读   

公司的开发机申请外网权限很麻烦,又不想用双系统,因此就有了用VMware搭建Ubuntu的需求

我选用的是Ubuntu Server 10.04(LTS) 64-Bit

1. 下载

http://www.ubuntu.com/download/server/download

2. 安装VMware(我安装的是8.0.2)

3. 安装Ubuntu

4. 进行一些配置:

 

更新源:
 
更新开发环境:
sudo apt-get install build-essential
 
安装vim(默认的vim高亮功能较弱):
sudo apt-get install vim

 

安装OpenSSH Server
sudo apt-get install openssh-server
 
启动:
/etc/init.d/ssh restart
 
如果ssh的时候出现了:The remote system refused the connection.
则需要在/etc/rc.local添加/usr/bin/ssh-agent
 
在Ubuntu下运行:ifconfig
IP即为:192.168.182.128
接下来就可以用SecureCRT访问这个IP了
 
可以把LAMP也一并安装好,可以用源代码安装,也可以参考这个:
 
通过POST上传文件的配置可以参考这个:
 
要注意的是用apt安装的apache运行的用户为www-data,需注意权限问题
可以使用chmod 777 dir命令修改权限
 

 

分类: Linux 标签: ,

iPhone序列号查询

2012年4月19日 没有评论 51 人阅读   
分类: 杂项 标签:

linux下生成随机密码的几种方法

2012年3月29日 没有评论 82 人阅读   

在linux上生成密码的方法主要有以下几种:

1. 使用urandom

< /dev/urandom tr -dc A-Za-z0-9 | head -c${1:-32};echo;
< /dev/urandom tr -dc A-Za-z0-9 | head -c32; echo
tr -cd '[:alnum:]' < /dev/urandom | fold -w32 | head -n1
strings /dev/urandom | grep -o '[[:alnum:]]' | head -n 32 | tr -d '\n'; echo
dd if=/dev/urandom bs=1 count=32 2>/dev/null | ba^C64 -w 0 | rev | cut -b 2- | rev
</dev/urandom  tr -dc '12345!@#$%qwertQWERTasdfgASDFGzxcvbZXCVB' | head -c8; echo ""

2. 使用基于urandom的命令,如openssl

openssl rand -base64 32
openssl rand -hex 16

3. 使用date+md5sum

date | md5sum | awk '{print $1}'
date | md5sum | base64
date +%s | sha256sum | base64 | head -c 32 ; echo

此方法每秒之内生成的密码相同,因此不适合大量使用

4. 自己写

    自己写有可能不是非常随机,暂不考虑

总体上讲,使用openssl的方法算最简洁的,但不如urandom随机性好

分类: Linux, 杂项 标签:

无觅相关文章插件,快速提升流量