0

Linux shell (ch1ch2) Linux与Shell简介

 2 years ago
source link: https://yuxinli1.github.io/Linux-shell-ch1ch2-Linux%E4%B8%8EShell%E7%AE%80%E4%BB%8B/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

GNU's not Unix. Recursive acronym, 递归缩写。nu 是确定的,即 not unix。在 nu 前随便加个字母,正好 gnu 是牛羚,所以用了GNU。

gnu, 又名 wildebeest, 牛羚的一种。

gnu.svg

GNU Debuger.

Wine is not an emulator.

emulator 模拟器

bash shell 由GNU项目开发,作为标准Unix shell — Bourne shell替代品。bash, 即Bourne again shell.

内核的四个功能

内存管理,物理内存,虚拟内存,交换空间swap space,换出swapping out。

进程管理,如Ubuntu中将开机时启动或停止某个应用的脚本放在/etc/init.d目录下,这些脚本通过/etc/rc#.d目录下的“入口”(实际上是到/etc/init.d中启动脚本的符号链接)启动,“#”代表运行级 run level。

init.png
rc%23.png

设备管理,可插拔驱动代码,设备文件(字符型设备文件、块设备文件、网络设备文件)。字符型设备文件,如调制解调器(数字信号和模拟信号互相转换)、终端等。块设备文件,如硬盘等。网络设备文件,如网卡,回环设备(允许Linux使用常见的网络编程协议同自身通信)等。节点文件,主设备号、次设备号。

文件管理,ext(Linux extend file system)。

GNU工具

GNU coreutils

Shell

  • ash 轻量级shell,运行在内存受限环境中,与bash完全兼容
  • korn 与Bourne shell兼容,支持高级编程特性
  • tcsh 将C语言引入shell
  • zsh 结合bash、tcsh、korn特性,提供高级编程等特性的高级shell

Linux桌面环境

  • X Window系统
  • KDE桌面,K Desktop Environment
  • GNOME,the GNU Network Object Model Environment
  • Unity桌面
  • -----👇可在较低配置-----
  • Fluxbox
  • JWM, Joe's Window Manager, Puppy Linux antiX发行版采用
  • fvwm95

Linux发行版

  • 完整的核心Linux发行版
    • Slackware 最早的Linux发行版中的一员,Linux极客中较流行
    • Red Hat 主要用于Internet服务器商用发行版
    • Fedora Red Hat中分离出的家用版
    • Gentoo 为高级Linux用户设计,仅包含Linux源代码
    • openSUSE
    • Debian 在Linux专家和商用Linux产品中流行
  • 特定用途的发行版
    • CentOS 基于Red Hat企业版Linux源代码构建的免费发行版
    • Ubuntu 学校家庭免费发行版
    • PCLinuxOS 家庭及办公免费发行版
    • Mint 家庭娱乐免费发行版
    • dyne:bolic 音频和MIDI应用的免费发行版
    • Puppy Linux 适用于老旧PC的小型免费发行版
  • LiveCD测试发行版(无需安装)
    • Knoppix 来自德国,也是最早的LiveCD Linux
    • PCLinuxOS
    • Ubuntu
    • Slax 基于Slackware Linux
    • Puppy Linux
    • 利用通信电缆(一般是一条多线束的串行电缆)连接到Unix系统上的一台显示器和一个键盘
  • 文本模式,Linux控制台

  • 虚拟控制台

    • Linux启动后会自动创建一些虚拟控制台

    • Ubuntu

      • Ctrl+Alt+F1 图形界面

      • Ctrl+Alt+F2 无反应

      • Ctrl+Alt+F3 虚拟控制台tty3,处于登录状态

      • Ctrl+Alt+F4 虚拟控制台tty4,未登录状态

      • Ctrl+Alt+F5 虚拟控制台tty5,未登录状态

      • Ctrl+Alt+F6 虚拟控制台tty6,未登录状态

      • Ctrl+Alt+F7 显示如下内容:

        /dev/nume0n1p2: clean, 1284431/7782400 files, 17034722/3127296 blocks
        _(光标闪动,无法输入)

        tty, teletypewriter, 电传打字机, 一台用于发送消息的机器

    • 虚拟控制台用于设置前景色和背景色的setterm选项

      • -background,参数(black,red,green,yellow,blue,magenta,cyan,white)
      • -forefround,参数(同上)
      • -inversescreen,参数(on、off)
      • -reset,回复默认并清屏
      • -store,将当前前景色和背景色设为-reset选项值
  • 图形化终端仿真器

    • 图形界面组成

      名称 例子 描述
      客户端 图形化终端仿真器、桌面环境、网络浏览器 请求图形化服务的应用
      显示服务器 Mir,Wayland Compositor,Xserver 负责管理显示(屏幕)和输入设备(键盘、鼠标、触摸屏)
      窗口管理器 Compiz,Metacity,Kwin 为窗口加入边框,提供窗口移动和管理功能
      部件库 Athenal(Xaw),X Intrinsics 为桌面环境中的客户端添加菜单以及外观项

GNOME

gnome-terminal,用来启动GNOME终端仿真器的shell命令。

Copy : Shift+Ctrl+C

Paste : Shift+Ctrl+V


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK