Linux Basic Contents 1

A, TCP / IP architecture - Protocol Overview (Figure)

1. The application layer

(1) ftp: File Transfer Protocol

(2) http / https: Displays the contents of the browser

(3) tftp: file transfer

(4) snmp: Network Management

(5) dns: Operations resolve

  (6) telnet, ssh: Remote Desktop

(7) smtp, pop3, imap: e-mail transmission and reception

2. Transport Layer

(1) TCP protocol: Transmission Control Protocol

(2) UDP protocol: Protocol Data Unit

(3) ICMP protocol: Internet Control Management Protocol

3. The Internet layer

(1) routing protocol: dynamic routing protocols, static routing protocol

(2) routing protocol: ipv4, ipv6 (IP address required for data conversion)

Second, the query command help

1.CPU architecture

    Run command on the ring 0 can directly call hardware resources, run the internal command, the command can not call external hardware resources directly

2.help 

(1) Classification Command: internal command -help command; external command -command --help (-h)

3.man (more)

(1)man command

(2) / (Ubuntu) Find downwardly designated contents, where n is the look down, N is up to find; \ (CentOS)

(3)? Look up the specified content

(4) q quit

4. Baidu Google

(1) probably understand what it meant

(2) To find the example

Linux directory structure

First, the directory structure under Windows

Two, Linux (Ubuntu) directory structure

1. tree, all started from a file

2.df command

(1) -h view disk mount case

      [Dd if = / dev / zero of = / root / image bs = 1024k count = 100 // create a loopback device (virtual disk)]

(2)/dev/sad1:

        a./dev: path to the file storage device

        b.sad1: sd Representative scsi type (hd IDE) disk, a magnetic disk represents the first A, the first slice 1

3.fdisk: dividing partition

4.mkfs: Format (file system is created)
5.mount: Disk mount
6.umount: disk unloaded

二、Linux的主要目录

1.  /:根目录
2.  /bin :存放命令文件
3.  /boot :存放系统启动文件(内核、grub程序)
4.  /cdrom :光盘目录
5.  /dev :存放设备文件(c字符设备、d块设备)
6.  /etc :大部分的系统配置文件
7.  /home :普通用户的家目录
8.  /lib /lib64:  库文件(.so结尾的文件)
9.  /lost+found :非正常关机下的碎片文件(空磁盘挂载上来,默认就会有这个目录)
10.   /mnt /media :专门提供挂载的挂载点
11.   /opt :第三方软件的安装目录
12.   /proc /sys :进程、系统目录(默认是空的,只有启动后才会存放对应进程和系统文件)
13.   /root root:用户的家目录
14.   /sbin :存放命令的目录
15.   /tmp :临时文件存放目录
16.   /usr: 常见软件安装目录
17.   /var: 文件会随时更改的目录 -- 日志文件!

三、目录的常见命令
1、查看目录内容
(1)终端使用技巧:tab (自动补全)
(2)  ls : 查看文件内容

2、搜索使用过的命令
(1)Ls
(2)文件通配符:
  a.  * -- 任意长度的任意字符
  b.  ? -- 任意一个字符
  c.  [] -- 取值范围(只取范围中的一个字符)
  d.  sd[abc] -- sda sdb sdc
  e.  [a-f] -- sd[a-f] sda adb ... sdf
  f.  ^ -- 托字符,指定以某个字符开头
  g.  $ -- 以什么字符结尾

  h.  grep命令 -- 行过滤
  i.  grep [选项] [匹配的字符] [对象]
  j.  查看文件中的匹配,过滤某一行:
  k.  -v 反选 ^$ -- 空白行
  l.  -i 忽略大小写
3、切换目录
(1)Cd
(2)常见特殊目录:
  a.  .
  b.  ..
  c.  ~
  d.  -
4.相对路径和绝对路径
(1)绝对路径:从根开始,写全咯
(2)相对路径:相对当前路径而言,你所要处理的目录

 

Guess you like

Origin www.cnblogs.com/baoleiiwa/p/11290277.html
Recommended