1 / 94

Linux 操作系统

Linux 操作系统. 内容提要. 什么是 linux? Linux 的特性 Linux 与其它操作系统的区别 为什么要学 linux ? 如何学习 linux. 什么是 linux? linux 是一套免费使用和自由传播的类 unix 操作系统. Linux 的特性. * 开放性 遵循开放系统互联国际标准 *多用户性 是指系统资源可以被不同用户使用 *多任务 是指计算机同时执行多个程序. Linux 的特性. * 设备独立

adonica
Télécharger la présentation

Linux 操作系统

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Linux操作系统

  2. 内容提要 • 什么是linux? • Linux的特性 • Linux与其它操作系统的区别 • 为什么要学linux? • 如何学习linux

  3. 什么是linux? linux是一套免费使用和自由传播的类unix操作系统

  4. Linux的特性 *开放性 遵循开放系统互联国际标准 *多用户性 是指系统资源可以被不同用户使用 *多任务 是指计算机同时执行多个程序

  5. Linux的特性 *设备独立 设备独立性是指操作系统把所有外部设备统一当作成文件来看待,只要安装它们的驱动程序,任何用户都可以象使用文件一样,操纵、使用这些设备,而不必知道它们的具体存在形式。

  6. Linux的特性 *可靠的安全性 Linux采取了许多安全技术措施,包括对读、写控制、带保护的子系统、审计跟踪、核心授权等,这为网络多用户环境中的用户提供了必要的安全保障。 *良好的可移植性 Linux可移植性是指将操作系统从一个平台转移到另一个平台使它仍然能按其自身的方式运行的能力。

  7. Linux与其它操作系统的区别 1.与ms-dos的区别 * 就发挥处理器功能来说, MS-DOS没有完全实现x86处理器的功能,而Linux完全在处理器保护模式下运行,并且开发了处理器的所有特性 *Linux可以直接访问计算机内的所有可用内存,提供完整的Unix接口。而MS-DOS只支持部分Unix的接口。

  8. Linux与其它操作系统的区别 *就使用费用而言 Linux是免费的,用户可以从internet上或者其他途径获得它的版本,而且可以任意使用,不用考虑费用问题。 *就操作系统的功能来说,MS-DOS是单任务的操作系统,而Linux是多任务的操作系统

  9. Linux与其它操作系统的区别 2.与windows的区别 *从发展的背景看,Linux与其他操作系统的区别是,Linux是从一个比较成熟的操作系统发展而来的,而其他操作系统,Windows NT等,都是自成体系,无对应的相依托的操作系统

  10. Linux与其它操作系统的区别 *从使用费用上看,Linux与其他操作系统的区别在于Linux是一种开放、免费的操作系统,而其他操作系统都是封闭的系统,需要有偿使用。

  11. 为什么要学linux • Linux是一个开放的、免费的,高安全和高性能的网络服务器操作系统 • 科研需求

  12. 核心的级别 是测试版还是稳固版 修正序列号 Linux版本介绍 • Red Hat、Fedora Core、Suse、CentOS、红旗linux • Linux内核版本介绍 核心版本号的形式:x. x. xx

  13. UNIX的历史 UNIX主要发展历程和UNIX类操作系统 AT&T 1969 Ken Thompson, Dennis Ritchie在AT&T写出第一个UNIX 1974 UNIX V4 1975 UNIX V6 1989 System V Release 4

  14. UNIX的历史 UNIX主要发展历程和UNIX类操作系统 Berkeley 1977 1BSD 1980 4.0BSD 90年代初 4.4BSD-Lite删除了来自于AT&T的代码,4.4BSD-Lite2发布后,Berkeley的计算机系统研究组解散

  15. UNIX的历史 Linux 发展的重要里程碑 1990, Linus Torvalds 首次接触 MINIX 1991 中, Linus Torvalds 开始在 MINIX 上编写各种驱动程序等操作系统内核组件 1991 底, Linus Torvalds 公开了 Linux 内核 1993, Linux 1.0 版发行,Linux 转向 GPL 版权协议

  16. UNIX的历史 Linux 发展的重要里程碑 1994, Linux 的第一个商业发行版 Slackware 问世 1996, 美国国家标准技术局的计算机系统实验室确认 Linux 版本 1.2.13(由 Open Linux 公司打包)符合 POSIX 标准 1999, Linux 的简体中文发行版相继问世

  17. UNIX的历史 其他UNIX类操作系统 教学用UNIX:MINIX IBM UNIX:AIX SUN UNIX:Solaris Novell UNIX:Unixware

  18. Linux系统具有很强的适应性。Windows操作系统只能运行在Intel处理器上,各厂商的UNIX只能运行在各自的处理器上,但是Linux系统几乎能运行在所有常见的处理器上。Linux还支持广泛的外部设备,在Linux中可以找到几乎所有的设备驱动程序。

  19. Linux平台下有大量的应用软件,如电子表格、字处理、数据库、联网工具以及游戏等。此外,Linux使用RPM包来包装软件,用rpm命令可以很方便地安装、查询、卸载软件。Linux还支持一系列的开发工具,几乎所有的主流程序设计语言都可以移植到Linux上。Linux平台下有大量的应用软件,如电子表格、字处理、数据库、联网工具以及游戏等。此外,Linux使用RPM包来包装软件,用rpm命令可以很方便地安装、查询、卸载软件。Linux还支持一系列的开发工具,几乎所有的主流程序设计语言都可以移植到Linux上。

  20. Linux环境的建立

  21. Linux常用命令 登陆和退出系统 login,logout,exit,su,who,passwd 帮助 man 日期 date,cal

  22. Linux常用命令 文件的复制、删除和移动 cp,rm,mv 目录的创建与删除 ls,cd,pwd mkdir,rmdir

  23. Linux常用命令 文本处理 sort,cat,less,more,tail 文本编辑 vi 备份和压缩 tar

  24. Linux常用命令 文件权限更改 chmod,chown,chgrp 磁盘管理 du,df 网络通信 ftp,telnet, ssh

  25. Linux常用命令 编程工具 gcc,gdb,ld,make 其他命令 clear <,>,>>,|

  26. Linux shell编程 • Shell是什么 • Shell本身是一个程序,而不是内核的一部分 • Shell是一种特殊的命令解释器,还是一种编程语言 • 常见shell bsh, csh, bash

  27. Linux shell编程 • Shell脚本类似dos批处理文件,但是功能强大的多 • 可以有变量,可以有条件语句,循环语句等

  28. Linux shell编程 • 简单例子: If test $1 Then Cal $1 Else Echo error fi #end

  29. 2.2.1 Linux目录结构 图2-1 Linux的目录结构

  30. 2.2.2 目录功能简介 • mount [-参数] [设备名称] [装载点] • # mk /mnt/floppy • # mount -t msdos /dev/fd0 /mnt/floppy • # mk /mnt/cdrom • # mount -t iso9660 /dev/cdrom /mnt/cdrom • # mk /mnt/winc • # mount -t vfat /dev/hda1 /mnt/winc • umount [-参数] [设备名称] [装载点] • # umount /mnt/floppy • # umount /dev/sda1

  31. 2.3 Linux系统的基本操作 • 2.3.1 Linux系统的启动与退出 [root@localhost /root] # shutdown [选项] 时间 [警告] #shutdown now #shutdown +5 "System will shutdown after 5 minutes" #shutdown –r now #shutdown –r 23׃59 & #shutdown –h now #shutdown –k 3 Warning: System will shutdown !

  32. 查看硬件信息 • lsb_release -a 查看系统版本。 • cat /etc/redhat-release 看这个配置文件也可以。不过管理员可以修改这里的内容 • cat /proc/cpuinfo 查看cpu信息,processor 0 为一个U, 1为两个,flags超线程。 • free 查内存 fidsk -l 查硬盘空间 • df -h 查硬盘 • top 这个比较全,内存 进程 负载 都有了。 • uptime 查运行时间 负载情况

  33. 2.3.2 Linux系统对文件和目录的操作命令 • ls [选项] [目录或是文件] • $ls –l • $ls –ld xh • $ls –as –S • cp [选项] 源文件或目录 目标文件或目录 • $cp file1.txt file2.txt • $cp –i /usr/file3.txt /home/xh/file4.txt

  34. mv [选项] 源文件或目录 目标文件或目录 • $mv file1 file2 • $mv file .. • rm [选项] 文件名|目录名 • $rm file1.txt • $rm –i* • $rm –rf xh • mkdir [选项] dir-name • $mkdir xh • $mkdir –p newdir/subdir

  35. $mkdir –m744 dir • rmdir [选项] dir-name • $rmdir dir • cd [路径] • $cd .. • $cd subdir • pwd • $pwd

  36. cat [选项] 文件列表 • $cat –b linuxbook.txt • $cat > testfile.txt • $cat file1 file2 > file3 • find目录列表 [选项] • $find/-name a.txt • $find/-name*.htm –a –user xf • $find . –name "*.txt" –print

  37. $find /usr –user xh –print • $find . –name "*.txt" –mtime +2 –mtime -7 –print • $find . –type f –size +1000c –atime +30 –OK rm {}\; • $find .\ (-user xh –o –user ggyy\) –print –exec rm {}\; • grep [选项] 字符串 文件列表 • $grep 'text file' example • $grep data*

  38. $cat > mypats • editor • create • 按组合键Ctrl+D • $grep –f mypats exam • more [选项] 文件名 • $more linuxbook.txt • $ls –l | more

  39. 2.3.3 文档备份与压缩命令 • tar [主选项+辅选项] 文件或者目录 • $tar –cvf data.tar* • $tar –cvzf data.tar.gz* • $tar –tvf data.tar • $tar -xvf data.tar • gzip [选项] 压缩(解压缩)的文件名

  40. $gzip --best data.txt • $gzip –l data.txt.gz • $gzip –d data.txt.gz • unzip [选项] 压缩文件名.zip • $unzip myfiles.zip • $unzip myfiles.zip –d mydir • $unzip –j myfiles.zip

  41. 2.3.4 权限改变命令 • $ ls -l sobsrc. tgz • -rw-r--r-- 1 root root 483997 Ju1 l5 17׃3l sobsrc. tgz • -rw-r--r-- • chmod [who] [操作符] [mode] 文件名 • $chmod o+w file5 • $chmod g=x file5 • $chmod go-rwx xh • chmod [mode] 文件名

  42. $chmod 751 file6 • $chmod 077 file6 • $chmod 0666 file8 • $chmod 0600 file9 • chgrp [选项] 组 文件 • $chgrp xh file10 • chown [选项] 用户或组 文件 • $chown xh file11

  43. 2.3.5 Linux与用户有关的命令 • passed [用户名] • #passwd xh • Changing password for user xh. • New password: • Retype new password: • passwd: all authentication tokens updated successfully. • #

  44. #passwd –S xh • #passwd –d user1 • su [使用者账号] • $su • password: • #

  45. 2.3.6 Linux系统管理命令 • write 用户账号 [终端名称] • $ write Cuest hello • $ write Guest • mesg [y/n] • $ mesg n • free [-b | -k | -m] • $free −k

  46. 2.3.7 Linux磁盘管理命令 • df [选项] • $df –aT • $df –t ext3 • du [选项] [目录名或文件名] • $du • $du –a / • $du –s xh • dd [选项]

  47. $dd if=/dev/fd0h1200 of=/dev/fd0h1440 bs=5120 • $dd if=/dev/fd0h1440 of=/home/xh • $dd if=/home/xh/test.txt of=/dev/fd0 • fdformat [−n] 设备名 • $fdformat /dev/fd0h1440

  48. 2.3.8 进程管理命令 • at 时间 [日期] [文件名] • $at 10׃30 5/26/2005 who • bg或fg • $./netscape & • 或 • $./netscape • 按Ctrl+Z组合键中断 • $bg • $fg

  49. who • $who • $who -HiT • w • $w • $w xh • ps [选项] • $ps –u • $ps –l • $ps –al • $ps –aux • kill [-signal ] 进程号 • $kill 1330 • $kill -15 1330 • $kill -9 1330

  50. 2.3.9 Linux其他命令 • echo [ -n ] 字符串 • $echo "Hello,everybody!" • cal [选项] [月份] [年] • $cal • $cal -y • date [选项] +显示时间格式 • $date • $date 08211550 • clear • $clear

More Related