LINUX 菜鸟私房菜---体系观

来源:互联网 发布:淘宝店铺采集器 编辑:程序博客网 时间:2024/05/06 19:22

 0linux 版本的介绍

如何学习LINUX

http://ixdba.blog.51cto.com/2895551/569329/

1linux 命名的缩写

命令缩写:
ls:list(列出目录内容)
cd:Change Directory(改变目录)
su:switch user 切换用户
rpm:redhat package manager 红帽子打包管理器
pwd:print work directory 打印当前目录 显示出当前工作目录的绝对路径
ps: process status(进程状态,类似于windows的任务管理器) 常用参数:-auxf
ps -auxf 显示进程状态
df: disk free 其功能是显示磁盘可用空间数目信息及空间结点信息。换句话说,就是报告在任何安装的设备或目录中,还剩多少自由的空间。
rpm: 即RedHat Package Management,是RedHat的发明之一
rmdir:Remove Directory(删除目录)
rm:Remove(删除目录或文件)
cat: concatenate连锁 cat file1 file2>>file3把文件1和文件2的内容联合起来放到file3中
insmod: install module,载入模块
ln -s : link -soft 创建一个软链接,相当于创建一个快捷方式
mkdir:Make Directory(创建目录
touch
man: Manual
pwd:Print working directory
su:Swith user
cd:Change directory
ls:List files
ps:Process Status
mkdir:Make directory
rmdir:Remove directory
mkfs: Make file system
fsck:File system check
cat: Concatenate
uname: Unix name
df: Disk free
du: Disk usage
lsmod: List modules
mv: Move file
rm: Remove file
cp: Copy file
ln: Link files
fg: Foreground
bg: Background
chown: Change owner
chgrp: Change group
chmod: Change mode
umount: Unmount
dd: 本来应根据其功能描述“Convert and copy”命名为“cc”,但“cc”已经被用以代表“C Complier”,所以命名为“dd”,但是dd又解释成disk dump,意思是磁盘转储,意思和Convert and copy一样。总之,官方手册把dd解释成Convert and copy a file。
tar:Tape archive
ldd:List dynamic dependencies
insmod:Install module
rmmod:Remove module
lsmod:List module
文件结尾的"rc"(如.bashrc、.xinitrc等):Resource configuration
Knnxxx / Snnxxx(位于rcx.d目录下):K(Kill);S(Service);nn(执行顺序号);xxx(服务标识)
.a(扩展名a):Archive,static library
.so(扩展名so):Shared object,dynamically linked library
.o(扩展名o):Object file,complied result of C/C++ source file
RPM:Red hat package manager
dpkg:Debian package manager
apt:Advanced package tool(Debian或基于Debian的发行版中提供)
部分Linux命令缩写
 
 
bin = BINaries
/dev = DEVices
/etc = ETCetera
/lib = LIBrary
/proc = PROCesses
/sbin = Superuser BINaries
/tmp = TeMPorary
/usr = Unix Shared Resources
/var = VARiable ?
FIFO = First In, First Out
GRUB = GRand Unified Bootloader
IFS = Internal Field Seperators
LILO = LInux LOader
MySQL = My是最初作者女儿的名字,SQL = Structured Query Language
PHP = Personal Home Page Tools = PHP Hypertext Preprocessor
PS = Prompt String
Perl = "Pratical Extraction and Report Language" = "Pathologically Eclectic Rubbish Lister"
Python 得名于电视剧Monty Python's Flying Circus
Tcl = Tool Command Language
Tk = ToolKit
VT = Video Terminal
YaST = Yet Another Setup Tool
apache = "a patchy" server
apt = Advanced Packaging Tool
ar = archiver
as = assembler
awk = "Aho Weiberger and Kernighan" 三个作者的姓的第一个字母
bash = Bourne Again SHell
bc = Basic (Better) Calculator
bg = BackGround
biff = 作者Heidi Stettner在U.C.Berkely养的一条狗,喜欢对邮递员汪汪叫。
cal = CALendar
cat = CATenate
cd = Change Directory
chgrp = CHange GRouP
chmod = CHange MODe
chown = CHange OWNer
chsh = CHange SHell
cmp = compare
cobra = Common Object Request Broker Architecture
comm = common
cp = CoPy
cpio = CoPy In and Out
cpp = C Pre Processor
cron = Chronos 希腊文时间
cups = Common Unix Printing System
cvs = Current Version System
daemon = Disk And Execution MONitor
dc = Desk Calculator
dd = Disk Dump
df = Disk Free
diff = DIFFerence
dmesg = diagnostic message
du = Disk Usage
ed = editor
egrep = Extended GREP
elf = Extensible Linking Format
elm = ELectronic Mail
emacs = Editor MACroS
eval = EVALuate
ex = EXtended
exec = EXECute
fd = file descriptors
fg = ForeGround
fgrep = Fixed GREP
fmt = format
fsck = File System ChecK
fstab = FileSystem TABle
fvwm = F*** Virtual Window Manager
gawk = GNU AWK
gpg = GNU Privacy Guard
groff = GNU troff
hal = Hardware Abstraction Layer
joe = Joe's Own Editor
ksh = Korn SHell
lame = Lame Ain't an MP3 Encoder
lex = LEXical analyser
lisp = LISt Processing = Lots of Irritating Superfluous Parentheses
ln = LiNk
lpr = Line PRint
ls = list
lsof = LiSt Open Files
m4 = Macro processor Version 4
man = MANual pages
mawk = Mike Brennan's AWK
mc = Midnight Commander
mkfs = MaKe FileSystem
mknod = MaKe NODe
motd = Message of The Day
mozilla = MOsaic GodZILLa
mtab = Mount TABle
mv = MoVe
nano = Nano's ANOther editor
nawk = New AWK
nl = Number of Lines
nm = names
nohup = No HangUP
nroff = New ROFF
od = Octal Dump
passwd = PASSWorD
pg = pager
pico = PIne's message COmposition editor
pine = "Program for Internet News & Email" = "Pine is not Elm"
ping = 拟声 又 = Packet InterNet Grouper
pirntcap = PRINTer CAPability
popd = POP Directory
pr = pre
printf = PRINT Formatted
ps = Processes Status
pty = pseudo tty
pushd = PUSH Directory
pwd = Print Working Directory
rc = runcom = run command, rc还是plan9的shell
rev = REVerse
rm = ReMove
rn = Read News
roff = RunOFF
rpm = RPM Package Manager = RedHat Package Manager
rsh, rlogin, rvim中的r = Remote
rxvt = ouR XVT
seamoneky = 我
sed = Stream EDitor
seq = SEQuence
shar = SHell ARchive
slrn = S-Lang rn
ssh = Secure SHell
ssl = Secure Sockets Layer
stty = Set TTY
su = Substitute User
svn = SubVersioN
tar = Tape ARchive
tcsh = TENEX C shell
tee = T (T形水管接口)
telnet = TEminaL over Network
termcap = terminal capability
terminfo = terminal information
tex = τέχνη的缩写,希腊文art
tr = traslate
troff = Typesetter new ROFF
tsort = Topological SORT
tty = TeleTypewriter
twm = Tom's Window Manager
tz = TimeZone
udev = Userspace DEV
ulimit = User's LIMIT
umask = User's MASK
uniq = UNIQue
vi = VIsual = Very Inconvenient
vim = Vi IMproved
wall = write all
wc = Word Count
wine = WINE Is Not an Emulator
xargs = eXtended ARGuments
xdm = X Display Manager
xlfd = X Logical Font Description
xmms = X Multimedia System
xrdb = X Resources DataBase
xwd = X Window Dump
yacc = yet another compiler compiler
Fish = the Friendly Interactive SHell
su = Switch User
MIME = Multipurpose Internet Mail Extensions
ECMA = European Computer Manufacturers Association

参考文献:

 http://blog.sina.com.cn/s/blog_6db312f101017wqk.html

2linux 命令的规则

[root@linux ~]# command          [-options]        parameter1                                   parameter2 ... 
                            指令                 选项             参数(1)                                         参数(2)

说明:

0. 一行指令中第一个输入的绝对是『指令(command)』或『可执行档案』           
1. command 为指令的名称,例如变换路径的指令为 cd 等等;
2. 中刮号[]并不存在于实际的指令中,而加入参数设定时,通常为 - 号,例如 -h;
有时候完整参数名称会输入 -- 符号,例如 --help;
3. parameter1 parameter2.. 为依附在 option 后面的参数,
或者是 command 的参数;
4. command, -options, parameter1.. 这几个咚咚中间以空格来区分,
不论空几格 shell 都视为一格;
5. 按下 [Enter] 按键后,该指令就立即执行。[Enter] 按键为 <CR> 字符,
他代表着一行指令的开始启动。
6. 指令太长的时候,可以使用 \ 符号来跳脱 [Enter] 符号,
使指令连续到下一行。注意! \ 后就立刻接特殊字符。
其它:
a. 在 Linux 系统中,英文大小写字母是不一样的。举例来说, cd 与 CD 并不同。
b. 更多的介绍等到 bash 时,再来详述

3linux 目录和分区

根目录及主要功能

/bin 二进制可执行命令 
/dev 设备特殊文件 
/etc 系统管理和配置文件 
/etc/rc.d 启动的配置文件和脚本 
/home 用户主目录的基点,比如用户user的主目录就是/home/user,可以用~user表示 
/lib 标准程序设计库,又叫动态链接共享库,作用类似windows里的.dll文件 
/sbin 系统管理命令,这里存放的是系统管理员使用的管理程序 
/tmp 公用的临时文件存储点 
/root 系统管理员的主目录(呵呵,特权阶级) 
/mnt 系统提供这个目录是让用户临时挂载其他的文件系统。 
/lost+found 这个目录平时是空的,系统非正常关机而留下“无家可归”的文件(windows下叫什么.chk)就在这里 
/proc 虚拟的目录,是系统内存的映射。可直接访问这个目录来获取系统信息。 
/var 某些大文件的溢出区,比方说各种服务的日志文件 
/usr 最庞大的目录,要用到的应用程序和文件几乎都在这个目录。其中包含: 
/usr/X11R6 存放X window的目录 
/usr/bin 众多的应用程序 
/usr/sbin 超级用户的一些管理程序 
/usr/doc linux文档 
/usr/include linux下开发和编译应用程序所需要的头文件 
/usr/lib 常用的动态链接库和软件包的配置文件 
/usr/man 帮助文档 
/usr/src 源代码,linux内核的源代码就放在/usr/src/linux里 
/usr/local/bin 本地增加的命令 
/usr/local/lib 本地增加的库

参考文献:

http://www.cnblogs.com/ZhangShuo/articles/1826326.html

目录和分区不同

参考文献:

http://wenku.baidu.com/view/6414b489cc22bcd127ff0c01.html

4 Shell 脚本语言

 

参考http://lovesoo.org/linux-shell-script-to-determine-basic-grammar.html

文献:http://vbird.dic.ksu.edu.tw/linux_basic/fedora_4/0340bashshell-scripts-fc4.php

 

5 vim 编辑环境

一般模式:除编辑外

命令模式:退出

编辑模式:编辑

参考文献:http://www.cnblogs.com/ltang/articles/2034291.html

通配符主要用于文件名匹配,正则表达式主要用于字符。

参考文献:http://blog.csdn.net/huiguixian/article/details/6284834

6 系统安全服务

6.1安装部署

     (时钟配置;文件权限[文件基本权限;SUID/SGID程序;用户掩码;];命令提示信息;系统启动文件;inetd.conf;ping响应;root路径;tcp/ip配置)

6.2认证授权

     (账号安全策略;未授权用户;su限制;超级用户数量)

6.3安全审计

    (系统日志)

6.4运行维护

     (任务计划,定期制行某任务;)

6.5应用服务

   (SNMP设置;FTPD;X-WINDOWS)

6.6 备份设备

  (备份资料)

参考文献:http://blog.sina.com.cn/s/blog_67852f5601013t9e.html

7 系统服务常用命令

 常用命令

find [path][option][action]

SUID,SGID,sticky Bit

开机流程

   boot loader 与 kernel 载入
  第一支程序 init 及设定文件 /etc/inittab 与 runlevel(图形/纯文字接口的转换)
   init 处理系统初始化流程 (/etc/rc.d/rc.sysinit)
  启动系统服务与相关启动设定档 (/etc/rc.d/rc.n & /etc/sysconfig)
  使用者自订开机启动程序 (/etc/rc.d/rc.local)
  根据 /etc/inittab 之设定,加载终端机或 X-Window 接口
  其它开机相关事项:/etc/modprobe.conf, /etc/sysconfig/*

  Run level 之变换: init

8 出错命令补救
ctrl+c,彻底终止该进程

0 0