------------------------------------------------------------------------------------------------------------------
1 修改root密码 http://www.cnblogs.com/65702708/archive/2011/04/08/2009138.html
sudo passwd root
sudo -s -H 切换root身份
------------------------------------------------------------------------------------------------------------------
2 安装ssh服务 http://hi.baidu.com/chenyangxin/item/18218c9dbc8d56dc1e42715e
sudo apt-get install openssh-server
ps -e | grep ssh :查看是否启动ssh,sshd进程表示启动.
/etc/init.d/ssh start
sudo /etc/init.d/ssh resart
------------------------------------------------------------------------------------------------------------------
3 解压命令 http://www.cnblogs.com/eoiioe/archive/2008/09/20/1294681.html
.tar
解包:tar xvf FileName.tar
打包:tar cvf FileName.tar DirName
(注:tar是打包,不是压缩!)
———————————————
.gz
解压1:gunzip FileName.gz
解压2:gzip -d FileName.gz
压缩:gzip FileName
.tar.gz 和 .tgz
解压:tar zxvf FileName.tar.gz
压缩:tar zcvf FileName.tar.gz DirName
———————————————
.bz2
解压1:bzip2 -d FileName.bz2
解压2:bunzip2 FileName.bz2
压缩: bzip2 -z FileName
———————————————
.zip
解压:unzip FileName.zip
压缩:zip FileName.zip DirName
------------------------------------------------------------------------------------------------------------------
4 安装rar解压软件
apt-get install rar
.rar
解压:rar x FileName.rar
压缩:rar a FileName.rar DirName
———————————————
------------------------------------------------------------------------------------------------------------------
5 切换用户命令
su mc
sudo root passwd
------------------------------------------------------------------------------------------------------------------
6 删除文件夹 http://phpq.net/linux/linux-delete-dir.html
rm -rf /var/log/httpd/access :删除文件夹
rm -f /var/log/httpd/access.log 删除文件
cp -R /home/A/a /home/B :A cp to B 拷贝文件夹
------------------------------------------------------------------------------------------------------------------
7 ubuntu手动安装jdk http://www.iteye.com/topic/340916
$ sudo chmod u+x jdk-6u12-linux-i586.bin
$ sudo -s ./jdk-6u12-linux-i586.bin
$ sudo gedit /etc/profile
#set java environment
JAVA_HOME=/home/liangshihong/jdk1.6.0_12
export JRE_HOME=/home/liangshihong/jdk1.6.0_12/jre
export CLASSPATH=.:$JAVA_HOME/lib:$JRE_HOME/lib:$CLASSPATH
export PATH=$JAVA_HOME/bin:$JRE_HOME/bin:$PATH
------------------------------------------------------------------------------------------------------------------