打开终端:alt+F2 , Terminal. (Ctrl+Alt+T)
虚拟机全屏显示:ctrl+alt+enter
安装时,出现404错误
执行sudo apt-get update更新一样都解决
sudo apt-get
换到root
sudo -i,
设置密码 sudo passwd root
去掉密码 sudo passwd -dl root
- sudo passwd root. This will create a password for your root account, essentially "enabling" it. Make sure you don't forget this password.
- Enter the command sudo -i. You will be asked for your root password.
- Your prompt will change from $ to #, indicating you have root access.
- To disable root access, enter the command sudo passwd -dl root
xdg-open filename
vi(M)
open:vi file anme
delete: dd(n) 删除行
删除字符:x
Esc: 回到命令模式。
i:进入输入模式。
保存:w,
保存退出:qw
强行退出:q!
mkdir 目录名 => 创建一个目录
rmdir 空目录名 => 删除一个空目录
rm 文件名 文件名 => 删除一个文件或多个文件
touch 文件名 => 创建一个空文件
rmdir 空目录名 => 删除一个空目录
rm 文件名 文件名 => 删除一个文件或多个文件
touch 文件名 => 创建一个空文件
重启一些服务
网络:
/etc/init.d/networking restart重启tomcat:
/etc/init.d/tomcat6 restart