日期:2014-05-16 浏览次数:20650 次
本文主要记录了我在工作中用到的一些linux命令
?
1、查询linux系统是32位还是64位
<!-- Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ -->zhaolei@zhaolei?:~# file /usr/bin/whoami /usr/bin/whoami: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.15, stripped
?
2、自动登入SSH
<!-- Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ -->zhaolei@zhaolei:~$ ssh-keygen -t rsa zhaolei@zhaolei:~$ ssh-copy-id -i ~/.ssh/id_rsa.pub root@192.168.1.100 zhaolei@zhaolei:~$ ssh root@192.168.1.100
?
3、修改用户登入名
<!-- Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ -->zhaolei@zhaolei:~$ sudo usermod -l flyingzl zhaolei
下次登入后,zhaolei就无法登入了,改用flyingzl登入,登入后的命令行效果如下: