RH033 [1]

简介:
2001年linux支持1024个cpu      sco unix起诉IBM把300个C和300个H加到linux核心--败诉,破产
linux=kernel(小于10M,单个文件,上千万行代码)+packges
linux 标准c语言接口,aparke也有标准C语言接口  GPL
任何事都是一个文件
一个程序很小
一个复杂程序由很多小程序完成
避免用户直接访问硬件
配置信息用文本文件存储
AIX   ODM+text
linux  text-conf
windows   regedit-----user.reg system
 
 
2.基本命令
pwd---显示当前的工作目录
file  查看文件格式
-   dash
/   slash
\   back slash
&   and
'   quote
"   double
*   star

3.help:
    ls --help  
    man ls  不会用命令查看   man手册最详细
    info key  查看版权信息 
根目录一定要划到分区下,子目录不一定要划
PI  开发接口,   UI 用户接口 分为CUI/CLI GUI    OS
4.文件的颜色及其相对应的关系

red -----package file  包文件
green -----( 程序,脚本
blue  ----(directory,foler)目录
/etc ----配置文件
/bin ----可执行程序,任何用户
/sbin ----(只有管理才可以运行)
/usr  ----系统自带的程序  mysql 
/opt ----自己下载的安装  oracle realplayer =C:program files
/boot ----linux核心存放处    
/lib ----linux标准程序库    *.so  windows  *.dll    
/var ---- 存放经常变的,有价值的数据   oracle   经常变   邮件数据  经常变
/tmp ----存放临时 数据----c:\temp  有些软件安装会产生中间数据,中间结果,这个文件里要定期清空
/home ----用户私有数据存放处    linux多用户多任务系统   windows单用户多任务系统
/proc ---- 伪文件系统,存在内存,开机动态构造,进程管理器,管理id,文件的存在
查看与修改核心
cat meminfo|less
/sys
/dev ----设备  文件 存放处   内存 光驱 ram 0 123
挂载附加文件 系统 的目录 mount=挂载    比如分区被mount 哪个目录或者子目录
什么是附加文件系统,比如flash 移动硬盘或者光盘
/mnt ----用户手动挂载
/misc ----由autofs进程自动挂载
/media ----桌面自动挂载

linux 遵循ieee,iso  windows不遵循标准,所以不上小机   

5.用户和组
 

account = user + group
authentication =password
local auth
remot auth ----central auth   AD=DS目录服务器    nis  AIX上      openldap

划分组是划分权限方便
g1(u1,u2,u3,u4)
local auth
          /etc/password ----user
          /etc/group ----group
          /etc/shadow ----password    影子口令   vim gshadow废弃 但是要,因为没有回报错
用户名:密码(现在没有了,保留做兼容用):用户id:主组id:个人信息:用户家目录:登陆后运行的第一个程序
一个账号只能属于一个主组,但是可以属于多个从组
组名:密码:组ID:组下的用户名
组:
      N=1   私有组
      N>1   公有组
主组和从组

 useradd u1 ---- AIX mkuser
userdel u1 ---- AIX rmuser
usermod u1 ---- AIX chuser
groupadd g1
groupdel g1
groupmod g1
passwd u1
cmd          option         object
useradd      -g g1 -G g1 g2     u1
 
permission  ===权限===》r w x (read write exec)
r:cp ls cat
w:cp rm mkdir
x:   program :run
      directory:cd(能打开目录)
netware -----权限很复杂,7种,forexam 拷贝禁止,读写禁止

linux/unix   rwx      uso
          user----(rwx)----》file
          file 访问者 :owner group other
          
          /tmp/f1.txt u1    g1     other
          chmod ugo+-=rwx f1.txt
          chmod ug+w  f1.txt
          +新增(在原有基础上)
          -删除
          =覆盖()
          chown   chgrp   chmod 777 f1.txt 所有人拥有所有权限 
*以.号开始的是隐藏文件
         手动添加
         1./etc/passwd  加一行
         2./etc/group   加一行
         3./etc/shadow  加一行
         4.mkdir /home/u1 ---》新用户
         5.chmod 700 /home/u1
         6.cp /etc/skel/* /home/u1

su root 切换到root
DOS - shell  传令兵  desktop 超级shell   *xsh  是一个命令交互和解释程序
敲命令有反应,我敲完命令,它通过这个命令分析你要干什么,功能实现并不负责,功能实现由操作核心解决问题
shel 程序
redhat  linux ---bash   命令补全,上下键
IBM AIX ---ksh
ls  *sh 
su  -u1
shell自己能处理,不用给核心,这叫内部命令
反之叫外部命令
ver logout 内部命令 shell内置
gcc game.c -o game
命令行  ghome-terminal   开个x1接口

''  ¥()
重定向  管道
 

less    可以翻页
more   单向敲回车
cat    
head   
tail
以上5个命令查看文本



     本文转自 珏石头 51CTO博客,原文链接:http://blog.51cto.com/gavinshaw/169843,如需转载请自行联系原作者


相关文章
|
Linux 网络安全 数据库
|
Shell Linux 数据安全/隐私保护
|
Linux 数据安全/隐私保护 Shell
|
Shell Linux 网络安全
|
Linux Shell 开发工具
|
Unix Linux Shell
|
Unix Linux 索引