The focus: TCP / IP protocol and linux main directory
1.TCO / IP protocol introduced
Transport Layer: TCP (Transmission Control Protocol) - more stable and reliable; one: 80-http, 20,21-ftp, 22-ssh
UDP (Protocol Data Unit) - instability and insecurity unreliable; many: 69-tftp, 68dhcp
ICM protocol: Internet Control Management Protocol, ping tool
2. Query Help
Command Category:
(1)help
Internal commands: Run command on the kernel space and kernel space can be called directly hardware
External command
(2)Man (more)
man Cmmand
/ - Find specified content (Ubuntu) downwardly; n-look downward, N up to find
? - look up the specified content; n look down, N look up
q quit
(3) Google Baidu
3. Common command directory
The directory structure under (1) Windows
(2 directory structure under) linux: tree; all files from the root
About disk partitions and mount command (/ etc / fstab - boot automatically mount)
df -h - Check disk mounts case
/ Dev-- device file storage path
fdisk - do partition
sd --scsi types of disk (hd IDE)
a - the first disk (b, c ......)
1-- first partition (2,3,4 ...)
mkfs -- 格式化(创建文件系统)
mount -- 磁盘挂载
umount -- 将磁盘卸载下来
注:/etc/fstab:通过命令行挂载的磁盘是临时的
创建虚拟磁盘,用dd创建必须用zero文件
dd if=/dev/zero of=/root/image2 bs=1024k count=10
4.linux的主要目录(所有目录都在主目录下)
命令:tree -ld 1 /
5.常见的命令
(1)查看目录内容:ls
终端使用技巧:自动补全
(2)搜索使用过的命令
Ls
文件通配符:
* ——任意长度的任意字符
? ——任意一个字符
[] ——取值范围(只取范围中的一个字符)
^——托字符,指定以某个字符开头
$ ——以什么字符结尾
grep命令 ——行过滤
命令:grep [选项] [匹配的字符] [对象]
a.查看文件中的匹配,过滤某一行
例:grep ^# /etc/fatab——过滤以#开头的行
b.-v :反选
例:grep -v ^# /etc/fatab——反选以#开头的行
c.^$ : 过滤空白行
例:grep -v ^#$ /etc/fatab——反选空白行
d.-i : 忽略大小写
6.绝对路径:从根开始,写全喽
相对路径:相对当前路径而言,你所要处理的目录