📄 主流unix服务器常用操作比较.htm
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><!-- saved from url=(0036)http://www.realsoi.com/UNIX-CMDS.HTM --><HTML><HEAD><TITLE>主流服务器UNIX操作系统比较</TITLE><META http-equiv=Content-Type content="text/html; charset=gb2312"><META content="MSHTML 6.00.2800.1106" name=GENERATOR><META content=FrontPage.Editor.Document name=ProgId></HEAD><BODY><DIV align=center><FONT face=黑体 color=#ff0000 size=4><B>[主流UNIX服务器常用操作比较]</B></FONT></DIV><DIV align=center><FONT face=黑体 color=#154060 size=4><B>fund@safechina.net </B></FONT></DIV><DIV align=center> </DIV><DIV align=center><FONT face=黑体 size=4><B>last update:2001.3.4</B> </FONT></DIV><HR SIZE=1><SPAN class=txt><TABLE style="BORDER-COLLAPSE: collapse" borderColor=#111111 cellSpacing=0 cellPadding=0 width="100%" border=1> <TBODY> <TR> <TD width=203 bgColor=#eeffee> <CENTER><B><TT>Directory Mappings </TT></B></CENTER></TD> <TD vAlign=center width=195 bgColor=#eeffee> <CENTER><B><TT>AIX</TT></B></CENTER></TD> <TD vAlign=center width=166 bgColor=#eeffee witdh="14%"> <CENTER><B><TT>FreeBSD</TT></B></CENTER></TD> <TD vAlign=center width=267 bgColor=#eeffee> <CENTER><B><TT>HP-UX</TT></B></CENTER></TD></TR> <TR> <TD width=203 bgColor=#ffffff><TT>Root filesystem</TT></TD> <TD width=195 bgColor=#ffffff><TT>/ {/dev/hd4}</TT></TD> <TD width=166 bgColor=#ffffff>/<TT> {/dev/ad0s1a}</TT></TD> <TD width=267 bgColor=#ffffff><TT>/ {/dev/vg00/lvol1}</TT></TD></TR> <TR> <TD width=203 bgColor=#eeffee><TT>Home Directory</TT></TD> <TD width=195 bgColor=#eeffee><TT>/home {/dev/hd1}</TT></TD> <TD width=166 bgColor=#eeffee> </TD> <TD width=267 bgColor=#eeffee><TT>/home {/dev/vg00/lvol4}</TT></TD></TR> <TR> <TD width=203 bgColor=#ffffff><TT> </TT></TD> <TD width=195 bgColor=#ffffff><TT>/tmp {/dev/hd3}</TT></TD> <TD width=166 bgColor=#ffffff> </TD> <TD width=267 bgColor=#ffffff><TT>/tmp {/dev/vg00/lvol6}</TT></TD></TR> <TR> <TD width=203 bgColor=#eeffee><TT> </TT></TD> <TD width=195 bgColor=#eeffee><TT>/usr {/dev/hd2}</TT></TD> <TD width=166 bgColor=#eeffee>/<TT>usr {/dev/ad0s1f}</TT></TD> <TD width=267 bgColor=#eeffee><TT>/usr {/dev/vg00/lvol7}</TT></TD></TR> <TR> <TD width=203 bgColor=#ffffff><TT> </TT></TD> <TD width=195 bgColor=#ffffff><TT>/var {/dev/hd9var}</TT></TD> <TD width=166 bgColor=#ffffff>/<TT>var {/dev/ad0s1e}</TT></TD> <TD width=267 bgColor=#ffffff><TT>/var {/dev/vg00/lvol8}</TT></TD></TR> <TR> <TD width=203 bgColor=#eeffee><TT>Sample configuration files</TT></TD> <TD width=195 bgColor=#eeffee><TT>-</TT></TD> <TD width=166 bgColor=#eeffee> </TD> <TD width=267 bgColor=#eeffee><TT>/usr/newconfig</TT></TD></TR></TBODY></TABLE><TABLE style="BORDER-COLLAPSE: collapse" borderColor=#111111 cellSpacing=0 cellPadding=0 width="100%" border=1> <TBODY> <TR> <TD width=205 bgColor=#eeffee> <CENTER> <P><B><TT>Directory Mappings </TT></B></P></CENTER></TD> <TD vAlign=center width=237 bgColor=#eeffee> <CENTER><B><TT>LINUX(RedHat)</TT></B></CENTER></TD> <TD vAlign=center width=190 bgColor=#eeffee> <CENTER><B><TT>SOLARIS</TT></B></CENTER></TD> <TD vAlign=center width=199 bgColor=#eeffee> <CENTER><B><TT>Tru64</TT></B></CENTER></TD></TR> <TR> <TD width=205 bgColor=#ffffff><TT>Root filesystem</TT></TD> <TD width=237 bgColor=#ffffff><TT>/ {/dev/sda1}</TT></TD> <TD width=190 bgColor=#ffffff><TT>/ {/dev/vx/dsk/rootvol}</TT></TD> <TD width=199 bgColor=#ffffff><TT>/ {/dev/rz0a}</TT></TD></TR> <TR> <TD width=205 bgColor=#eeffee><TT>Home Directory</TT></TD> <TD width=237 bgColor=#eeffee><TT> </TT></TD> <TD width=190 bgColor=#eeffee><TT>/export/home</TT><BR><TT> /dev/vx/dsk/home}</TT></TD> <TD width=199 bgColor=#eeffee><TT> </TT></TD></TR> <TR> <TD width=205 bgColor=#ffffff><TT> </TT></TD> <TD width=237 bgColor=#ffffff><TT> </TT></TD> <TD width=190 bgColor=#ffffff><TT>/tmp </TT><BR><TT> /dev/vx/dsk/swapvol}</TT></TD> <TD width=199 bgColor=#ffffff><TT> </TT></TD></TR> <TR> <TD width=205 bgColor=#eeffee><TT> </TT></TD> <TD width=237 bgColor=#eeffee><TT> </TT></TD> <TD width=190 bgColor=#eeffee><TT>/usr </TT></TD> <TD width=199 bgColor=#eeffee><TT>/usr {/dev/rz0g}</TT></TD></TR> <TR> <TD width=205 bgColor=#ffffff><TT> </TT></TD> <TD width=237 bgColor=#ffffff><TT> </TT></TD> <TD width=190 bgColor=#ffffff><TT>/var</TT></TD> <TD width=199 bgColor=#ffffff><TT> </TT></TD></TR> <TR> <TD width=205 bgColor=#eeffee><TT>Sample configuration files</TT></TD> <TD width=237 bgColor=#eeffee><TT> </TT></TD> <TD width=190 bgColor=#eeffee><TT> </TT></TD> <TD width=199 bgColor=#eeffee><TT> </TT></TD></TR></TBODY></TABLE></SPAN><DIV align=center> </DIV><SPAN class=txt><TABLE style="BORDER-COLLAPSE: collapse" borderColor=#111111 height=327 cellSpacing=0 cellPadding=0 width="100%" border=1> <TBODY> <TR> <TD bgColor=#ffffff height=13> <CENTER><B><TT>用户账号设置相关</TT></B></CENTER></TD> <TD bgColor=#ffffff height=13> <CENTER><B><TT>AIX</TT></B></CENTER></TD> <TD bgColor=#ffffff height=13> <CENTER><B><TT>FreeBSD</TT></B></CENTER></TD> <TD bgColor=#ffffff height=13> <CENTER><B><TT>HP-UX</TT></B></CENTER></TD></TR> <TR> <TD bgColor=#eeffee height=29><TT>密码文件</TT></TD> <TD bgColor=#eeffee height=29><TT>/etc/passwd</TT><BR><TT>/etc/security/passwd</TT></TD> <TD bgColor=#eeffee height=29>/<TT>etc/passwd</TT><BR><TT>/etc/master.passwd</TT></TD> <TD bgColor=#eeffee height=29><TT>/etc/passwd</TT><BR><TT>/tcb/files/auth/r/root</TT></TD></TR> <TR> <TD bgColor=#ffffff height=26><TT>组文件</TT></TD> <TD bgColor=#ffffff height=26><TT>/etc/group</TT><BR><TT>/etc/security/group</TT></TD> <TD bgColor=#ffffff height=26><TT>/etc/group</TT></TD> <TD bgColor=#ffffff height=26><TT>/etc/group</TT><BR><TT>/etc/logingroup</TT></TD></TR> <TR> <TD bgColor=#eeffee height=13><TT>允许的最大用户ID</TT></TD> <TD bgColor=#eeffee height=13><TT>4294967295</TT></TD> <TD bgColor=#eeffee height=13><TT>65535</TT></TD> <TD bgColor=#eeffee height=13><TT>2147483647</TT></TD></TR> <TR> <TD bgColor=#ffffff height=29><TT>允许远程登录的用户文件设置</TT></TD> <TD bgColor=#ffffff height=29><TT>/etc/security/user</TT><BR><TT>{rlogin=true}</TT></TD> <TD bgColor=#ffffff height=29>/<TT>etc/ttys </TT><BR><TT>{secure}</TT></TD> <TD bgColor=#ffffff height=29><TT>/etc/securetty</TT><BR><TT>{console}</TT></TD></TR> <TR> <TD bgColor=#eeffee height=13><TT>用户“nobody”的用户ID</TT></TD> <TD bgColor=#eeffee height=13><TT>4294967294</TT></TD> <TD bgColor=#eeffee height=13><TT>65534</TT></TD> <TD bgColor=#eeffee height=13><TT>-2</TT></TD></TR> <TR> <TD bgColor=#ffffff height=13><TT>“nobody”组的ID号</TT></TD> <TD bgColor=#ffffff height=13><TT>4294967294</TT></TD> <TD bgColor=#ffffff height=13><TT>65534</TT></TD> <TD bgColor=#ffffff height=13><TT>-2(nogroup)</TT></TD></TR> <TR> <TD bgColor=#eeffee height=65><TT>找回ROOT密码</TT></TD> <TD bgColor=#eeffee height=65><TT>boot from CD/Tape</TT><BR><TT>Installation/Maintenance</TT><BR><TT>Start Limited Shell</TT><BR><TT>getrootfs hdisk0</TT><BR><TT>vi /etc/security/passwd</TT></TD> <TD bgColor=#eeffee height=65><TT>ok boot -s</TT><BR><TT>passwd root</TT></TD> <TD bgColor=#eeffee height=65><TT>>boot<BR>Interact with IPL ? <B>Y</B><BR>ISL>hpux -iS</TT><BR><TT>passwd root</TT></TD></TR> <TR> <TD bgColor=#ffffff height=9><TT>创建新用户</TT></TD> <TD bgColor=#ffffff height=9><TT>mkuser</TT></TD> <TD bgColor=#ffffff height=9><TT>adduser</TT></TD> <TD bgColor=#ffffff height=9><TT>useradd</TT></TD></TR> <TR> <TD bgColor=#eeffee height=13><TT>删除用户</TT></TD> <TD bgColor=#eeffee height=13><TT>rmuser</TT></TD> <TD bgColor=#eeffee height=13><TT>rmuser</TT></TD> <TD bgColor=#eeffee height=13><TT>userdel</TT></TD></TR> <TR> <TD bgColor=#ffffff height=16><TT>列出用户</TT></TD> <TD bgColor=#ffffff height=16><TT>lsuser -f ALL</TT></TD> <TD bgColor=#ffffff height=16> </TD> <TD bgColor=#ffffff height=16><TT>logins</TT></TD></TR> <TR> <TD bgColor=#eeffee height=16><TT>修改用户帐号</TT></TD> <TD bgColor=#eeffee height=16><TT>chuser -a</TT></TD> <TD bgColor=#eeffee height=16> </TD> <TD bgColor=#eeffee height=16><TT>usermod</TT></TD></TR></TBODY></TABLE></SPAN><DIV align=center> </DIV><SPAN class=txt><TABLE style="BORDER-COLLAPSE: collapse" borderColor=#111111 cellSpacing=0 cellPadding=0 width="100%" border=1> <TBODY> <TR> <TD width=134 bgColor=#ffffff> <CENTER><B><TT>用户账号设置相关</TT></B></CENTER></TD> <TD width=274 bgColor=#ffffff> <CENTER><B><TT>LINUX(RedHat)</TT></B></CENTER></TD> <TD width=173 bgColor=#ffffff> <CENTER><B><TT>Solaris</TT></B></CENTER></TD> <TD width=248 bgColor=#ffffff> <CENTER><B><TT>Tru64</TT></B></CENTER></TD></TR> <TR> <TD width=134 bgColor=#eeffee><TT>密码文件</TT></TD> <TD width=274 bgColor=#eeffee><TT>/etc/passwd</TT><BR><TT>/etc/shadow</TT></TD> <TD width=173 bgColor=#eeffee><TT>/etc/passwd </TT><BR><TT>/etc/shadow</TT></TD> <TD width=248 bgColor=#eeffee><TT>/etc/passwd </TT></TD></TR> <TR> <TD width=134 bgColor=#ffffff><TT>组文件</TT></TD> <TD width=274 bgColor=#ffffff><TT>/etc/group</TT></TD> <TD width=173 bgColor=#ffffff><TT>/etc/group</TT></TD> <TD width=248 bgColor=#ffffff><TT>/etc/group</TT></TD></TR> <TR> <TD width=134 bgColor=#eeffee><TT>允许的最大用户ID</TT></TD> <TD width=274 bgColor=#eeffee><TT>65535</TT></TD> <TD width=173 bgColor=#eeffee><TT>2147483647</TT></TD> <TD width=248 bgColor=#eeffee><TT>65535</TT></TD></TR> <TR> <TD width=134 bgColor=#ffffff><TT>允许远程登录的用户文件设置</TT></TD> <TD width=274 bgColor=#ffffff><TT>/etc/securetty</TT><BR><TT>{ttyp1}</TT></TD> <TD width=173 bgColor=#ffffff><TT>/etc/default/login</TT><BR><TT>{CONSOLE=/dev/console}</TT></TD> <TD width=248 bgColor=#ffffff><TT>/etc/securettys</TT><BR><TT>{ttyp1}</TT></TD></TR> <TR> <TD width=134 bgColor=#eeffee><TT>用户“nobody”的用户ID</TT></TD> <TD width=274 bgColor=#eeffee><TT>99</TT></TD> <TD width=173 bgColor=#eeffee><TT>60001 & 65534(nobody4)</TT></TD> <TD width=248 bgColor=#eeffee><TT>65534</TT></TD></TR> <TR> <TD width=134 bgColor=#ffffff><TT>“nobody”组的ID号</TT></TD> <TD width=274 bgColor=#ffffff><TT>99</TT></TD> <TD width=173 bgColor=#ffffff><TT>60002 & 65534(nogroup)</TT></TD> <TD width=248 bgColor=#ffffff><TT>65534</TT></TD></TR> <TR> <TD width=134 bgColor=#eeffee><TT>找回ROOT密码</TT></TD> <TD width=274 bgColor=#eeffee><TT>{lilo}<BR>control-x<BR>linux S<BR>passwd root<BR><BR>{grub}<BR>c<BR>kernel vmlinuz-2.4.9-13 <B>single</B> ro root=/dev/hda8<BR>initrd /initrd-2.4.9-13.img<BR>boot<BR>passwd root</TT></TD> <TD width=173 bgColor=#eeffee><TT>boot cdrom -s</TT><BR><TT>mkdir /tmp/a</TT><BR><TT>mount /dev/c0t0d0s0 /tmp/a</TT><BR><TT>vi /tmp/a/etc/shadow</TT></TD> <TD width=248 bgColor=#eeffee><TT>press the HALT Button or (Control-P)</TT><BR><TT>>>>boot -fl s</TT><BR><TT>lsmbstartup</TT><BR><TT>/sbin/bcheckrc</TT><BR><TT>passwd root</TT></TD></TR> <TR> <TD width=134 bgColor=#ffffff><TT>创建新用户</TT></TD> <TD width=274 bgColor=#ffffff><TT>useradd</TT></TD> <TD width=173 bgColor=#ffffff><TT>useradd</TT></TD> <TD width=248 bgColor=#ffffff><TT>useradd</TT></TD></TR> <TR> <TD width=134 bgColor=#eeffee><TT>删除用户</TT></TD> <TD width=274 bgColor=#eeffee><TT>userdel</TT></TD> <TD width=173 bgColor=#eeffee><TT>userdel</TT></TD> <TD width=248 bgColor=#eeffee><TT>userdel</TT></TD></TR> <TR> <TD width=134 bgColor=#ffffff><TT>列出用户</TT></TD> <TD width=274 bgColor=#ffffff><TT> </TT></TD> <TD width=173 bgColor=#ffffff><TT>logins</TT></TD> <TD width=248 bgColor=#ffffff> </TD></TR> <TR> <TD width=134 bgColor=#eeffee><TT>修改用户帐号</TT></TD> <TD width=274 bgColor=#eeffee><TT>usermod</TT></TD> <TD width=173 bgColor=#eeffee><TT>usermod</TT></TD> <TD width=248 bgColor=#eeffee><TT>usermod</TT></TD></TR></TBODY></TABLE><BR><DIV align=center><CENTER><TABLE style="BORDER-COLLAPSE: collapse" borderColor=#111111 height=346 cellSpacing=0 cellPadding=0 width="100%" border=1>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -