[转] Linux下ctrl 常用组合键
在使用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
勾选如下两项:

公司的开发机申请外网权限很麻烦,又不想用双系统,因此就有了用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. 进行一些配置:
在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随机性好
最新评论