1 、单用户模式进系统 启动linux 出现grub画面时选中linux 按e 键
8 E; l+ {1 G: U% b kernel /boot/vmlinuz-2.4.18-14 ro root=LABEL=/按E 键2 ^7 ~% e2 j6 S9 Y6 h7 \
在ro前面加入single: v$ t- L+ a( w+ K( b* d" o/ E
kernel /boot/vmlinuz-2.4.18-14 single ro root=LABEL=/
( u5 N$ _+ N" o" g6 e' f8 [ 回车,按B 键进入系统。
, x- w: \2 A9 Z; ~& R/ @+ M2 ]. n 注意:freebsd 下再多加一个命令 mount -a
; k4 p7 Y" `3 A( r/ Z* d 2 、解压文件$ }2 A! j7 \& ]0 t0 {& ^
tar.bz 2文件的解压 #tar jxvf *.tar.bz 2
7 ?" X( A0 B1 g! n! m7 H+ h7 |; f* H. G tar.gz文件的解压 #tar xzpf *.tar.gz
8 O9 W9 G# o/ n: ~5 x! ] rpm 文件的解压 #rpm -ivh *.rpm
4 o- }& `, C; T) J: G' n 3 、激活ssh 服务( j L& @% r4 T( ^- \6 o
/etc/rc.d/init.d/sshd start
/ V9 h! _* D: ~, P2 ]" E5 n service sshd start0 v$ I% b0 v# J7 K4 N
ubuntu开启ssh 服务% y9 |0 u6 V8 G
studo apt-get install ssh
/ U3 L5 p- f) _4 ^! y $sudo passwd root
% d- [; w; h4 u9 F 4 、关闭防火墙& P" C2 H! l- H. i6 A
/etc/rc.d/init.d/iptables stop
* @* y2 ^+ L# b$ \' `% ]5 O Linux 防火墙的关闭和开启
& U; f( Y, P# \- l3 @8 d, v 1 )重启后生效
6 y) K0 @- ]& [4 j( F+ ] 开启: chkconfig iptables on
5 K5 R5 h, C/ ?! G- I3 n 关闭: chkconfig iptables off- [5 P- A7 P- b: F5 n W. W
2 )即时生效,重启后失效
; Q! U- y9 f- g# }' i 开启: service iptables start
& B* R% p$ V% I 关闭: service iptables stop
" W6 ], I) p0 r 需要说明的是对于Linux 下的其它服务都可以用以上命令执行开启和关闭操作。 |