Linux 基础知识汇总,介绍Linux的基础知识
Linux 基础知识
- 一般情况下,每个 Unix/Linux 命令运行时都会打开三个文件:
标准输入文件(stdin)
:stdin 的文件描述符为 0
,Unix程序默认从stdin读取数据
标准输出文件(stdout)
:stdout 的文件描述符为 1
,Unix程序默认向stdout输出数据
标准错误文件(stderr)
:stderr 的文件描述符为 2
,Unix程序会向stderr流中写入错误信息
- Linux 设备分为三类:
- 字符设备,如键盘、鼠标等
- 块设备,如硬盘、光驱、软驱等
- 网络设备,如以太网卡