Home | 简体中文 | 繁体中文 | 杂文 | Github | 知乎专栏 | 51CTO学院 | CSDN程序员研修院 | OSChina 博客 | 腾讯云社区 | 阿里云栖社区 | Facebook | Linkedin | Youtube | 打赏(Donations) | About
知乎专栏多维度架构

部分 I. System Administrator

目录

2. 获取系统信息
2.1. 查看版本信息
2.2. System Infomation
2.2.1. Cpu Bit
2.2.2. dmesg - print or control the kernel ring buffer
2.3. Device information 设备信息
2.3.1. 硬件信息
2.3.2. 网络设备
2.3.3. USB 设备
2.3.4. 存储设备
2.3.5. 内存设备
2.3.6. PCI 设备
2.3.7. udev - Linux dynamic device management
3. /etc 配置文件
3.1. /etc/rc.local
3.2. getent 用来察看系统的数据库中的相关记录
3.2.1. 主机名
3.2.2. 用户组
3.2.3. 查看端口
3.2.4. shadow 密码
3.3. /etc/inputrc
3.4. /etc/shells
3.5. shutdown
3.6. Profile
3.6.1. shell
3.7. 环境默认值
3.7.1. 显示所有配置项
3.7.2. 切换版本
3.7.3. 使用 alternatives 管理自己的软件版本
3.7.4. 配置系统默认编辑器
4. Kernel
4.1. 编译安装内核
4.2. sysctl - configure kernel parameters at runtime
4.2.1. sysctl.d
4.2.2. vm.overcommit_memory
4.2.3. TCP 拥塞控制算法
4.2.4. bbr
4.3. /sys
4.3.1. /sys/class/net/
4.3.2. sysfsutils
4.4. /proc
4.4.1. 查看系统版本
4.4.2. /proc/进程ID
4.4.3. /proc/*/fd/ 进程所打开的文件
4.4.4. 进程内存监控
4.4.5. ulimit 状态
4.4.6. /proc/cpuinfo
4.4.7. 内存信息
4.4.8. overcommit_memory
4.5. 资源配置
4.5.1. ulimit - Modify shell resource limits.
4.5.2. prlimit - Show or change the resource limits of a process.
4.6. Kernel modules
4.6.1. modprobe - program to add and remove modules from the Linux Kernel
4.6.2. 查看内核模块信息
5. Package Management
5.1. APT 包管理
5.1.1. 搜索软件包
5.1.2. 显示软件包的详细信息
5.1.3. policy
5.1.4. 软件包的依赖关系
5.1.5. 查看所属镜像
5.1.6. Installation
5.1.7. 重新安装
5.1.8. 列出已安装软件包
5.1.9. Update
5.1.10. Remove
5.1.11. purge
5.1.12. aptitude
5.1.13. Automatic Updates
5.1.14. 更换 api 源镜像
5.1.15. dpkg
5.1.16. Upgrading
5.1.17. 制作.deb安装包
5.2. snap - Tool to interact with snaps
5.2.1. 安装 snap
5.2.2. 列出已经安装的snap包
5.2.3. 搜索要安装的snap包
5.2.4. 安装snap包
5.2.5. 更新snap包
5.2.6. 把一个包还原到以前安装的版本
5.2.7. 删除snap包
5.2.8. 查询最近做的操作日志
5.3. DNF 包管理
5.3.1. 安装 epel-release 包
5.3.2. DNF 软件库管理
5.3.3. 显示系统中可用的 DNF 软件库
5.3.4. 列出所有 RPM 包
5.3.5. 搜索软件库中的包
5.3.6. 查看软件包详情
5.3.7. 查找某一文件的提供者
5.3.8. 删除软件包
5.4. yum - Yellowdog Updater Modified 包管理
5.4.1. Yum Resource & Yum Mirror
5.4.2. yum - Yellowdog Updater Modified
5.4.3. rpm - RPM Package Manager
5.4.4. rpmbuild - Build RPM Package(s)
5.5. Homebrew
5.5.1. OpenJDK 8
5.5.2. Maven
5.5.3. 版本切换
5.6. SDKMAN
5.7. 清理安装包
6. 区域/语言/时间
6.1. 时区设置
6.2. 修改服务区吃的日期和时间
6.2.1. 日期写入BIOS
6.3. 早起 Linux 版本
6.3.1. Ubuntu
6.3.2. CentOS 区域设置
7. console / terminal 控制台与终端
7.1. serial console
7.2. console timeout
7.3. TUI (Text User Interface)
7.4. framebuffer
8. Harddisk 磁盘管理
8.1. 查看分区分区 UUID
8.2. 通过 UUID 或 标签 查询设备文件
8.3. Label
8.3.1. Ext2
8.4. swap 交换分区
8.4.1. swapon failed: Invalid argument
8.5. Show partition
8.6. Create partition
8.7. Clone partition
8.8. estimate disk / directory / file space usage
8.9. Convert from ext3 to ext4 File system
8.10. GPT
8.10.1. 设置GTP磁盘
8.10.2. 查看分区
8.10.3. 创建分区
8.10.4. 删除分区
8.10.5. 退出
8.10.6. mount
8.11. loop devices
8.11.1. losetup - set up and control loop devices
8.12. Linux磁盘分区加密
9. Removable Storage
9.1. usb flash
9.2. CD / DVD
9.2.1. Mount an ISO file
9.2.2. create iso file from CD
9.2.3. burner
9.2.4. ISO Mirror
10. File System 文件系统
10.1. /etc/fstab
10.1.1. 绑定目录
10.1.2. 禁止执行
10.1.3. 禁止更新访问时间
10.1.4. /etc/fstab 例子
10.2. Mount partition
10.2.1. Mount
10.2.2. Umount
10.2.3. bind directory
10.3. ext2
10.4. ext3
10.5. EXT4
10.5.1. install
10.5.2. format
10.5.3. label
10.5.4. mount/umount
10.5.5. LVM 卷
10.6. ReiserFS
10.7. LVM
10.8. Btrfs
10.8.1. btrfs 格式化
10.8.2. 子卷 subvolumes
10.8.3. 快照 snapshot
10.8.4. 挂载 btrfs
10.8.5. btrfsctl
10.8.6. btrfs-vol
10.8.7. btrfs-convert
10.8.8. btrfsck
10.8.9. btrfs-debug-tree
10.9. zfs
10.10. iSCSI
10.10.1. GFS
10.11. GFS - Cluster Storage
10.12. glusterfs
10.13. RAM FS
10.14. tmpfs
10.15. ftp fs
10.16. SSHFS (sshfs - filesystem client based on SSH File Transfer Protocol)
10.17. davfs2 - mount a WebDAV resource as a regular file system
10.18. redisfs
10.19. File system test
10.19.1. ext4 vs btrfs
10.19.2. xfs vs jfs vs reiserfs
10.19.3. RAID10 (146G*8) vs EMC VNX 5300 (8G Fibre Channel)
10.19.4. Dell 2950(RAID5 500G SATA * 6) vs MD1200
10.20. 磁盘占用100%删除文件后不是放的解决方法
11. Networking 网络管理
11.1. hosts
11.1.1. /etc/hostname
11.1.2. /etc/host.conf
11.1.3. /etc/hosts
11.1.4. hosts.allow / hosts.deny
11.1.5. /etc/resolv.conf
11.2. Network adapter 网络适配器
11.2.1. 接口名称
11.3. CentOS 8 Stream
11.3.1. hostnamectl - Control the system hostname
11.3.2. nmtui - Text User Interface for controlling NetworkManager
11.3.3. nmcli - command-line tool for controlling NetworkManager
11.4. Ubuntu netplan (Ubuntu 18.04 之后才用 netplan 管理网络)
11.4.1. DHCP
11.4.2. 静态IP地址
11.5. Gateway 设置默认网关
11.6. 配置 DNS
11.6.1. 常规 DNS 配置 /etc/resolv.conf
11.6.2. 安全 DNS 配置
11.7. IP forwarding(IP转发)
11.8. bonding
11.8.1. bonding
11.8.2. Ubuntu
11.9. Wireless - WiFi 配置
11.9.1. rfkill - tool for enabling and disabling wireless devices
11.9.2. iwlist - Get more detailed wireless information from a wireless interface
11.9.3. iwconfig - configure a wireless network interface
11.9.4. /proc/net/wireless
11.10. Linux IP And Router
11.10.1. IP 地址类别
11.10.2. ping
11.10.3. Finding optimal MTU
11.10.4. ss - another utility to investigate sockets
11.10.5. netmask 子网掩码
11.10.6. arp - manipulate the system ARP cache
11.10.7. iproute2
11.10.8. VLAN
11.10.9. 网桥
11.10.10. Zebra
11.11. IPv6
11.11.1. 禁用 IPv6
11.12. 早期版本
11.12.1. 早期 Ubuntu
11.12.2. CentOS 6
12. 服务管理
12.1. 什么是 systemd
12.2. why-为什么做
12.3. systemd 是何时被采用的
12.4. 那些系统使用 systemd
12.5. system 是谁开发的
12.6. 怎样编写systemd脚本
12.6.1. Unit
12.6.2. Service
12.6.3. Install
12.7. systemd, init - systemd system and service manager
12.7.1. 电源管理
12.7.2. rc.local
12.7.3. 编辑 service 文件
12.7.4. 查看 service 文件
12.7.5. is-enabled 查看当前服务的启用状态
12.7.6. 重载 systemd
12.7.7. 列出启动失败的服务
12.7.8. list-units
12.8. 定时器单元
12.9. 查看配置项
12.10. Debian/Ubuntu
12.10.1. update-rc.d - install and remove System-V style init script links
12.10.2. invoke-rc.d - executes System-V style init script actions
12.10.3. runlevel
12.10.4. sysv-rc-conf
12.10.5. xinetd - replacement for inetd with many enhancements
12.10.6. Scheduled Tasks
12.10.7. sv - control and manage services monitored by runsv
12.11. CentOS 6
12.11.1. service
12.11.2. xinetd.d
12.11.3. rpcinfo
12.11.4. SELINUX
13. Process 进程管理
13.1. top - display Linux tasks
13.1.1. 查找内存消耗最大的进程
13.2. ps - report a snapshot of the current processes
13.2.1. 完整的显示命令参数
13.2.2. 显示进程之间的关系
13.2.3. ps axef
13.2.4. ps jax
13.2.5. 僵尸进程
13.2.6. 查找内存消耗最大的进程
13.2.7. 格式化输出
13.2.8. 线程
13.3. renice
13.4. kill - terminate a process
13.4.1. 列出信号名称
13.5. mpstat
13.6. pid
13.6.1. 查找进程 ID
13.6.2. pkill
13.6.3. pidof -- find the process ID of a running program.
13.7. jobs
13.7.1. &
13.7.2. Ctrl + Z
13.7.3. jobs
13.7.4. fg / bg
13.7.5. nohup - run a command immune to hangups, with output to a non-tty
13.7.6. wait 等待后台任务运行结束
13.8. ionice - get/set program io scheduling class and priority
13.9. Utilities for managing processes on your system
13.9.1. pstree - display a tree of processes
13.9.2. fuser - identify processes using files or sockets
13.10. pkexec - Execute a command as another user
14. 权限管理
14.1. User 用户管理
14.1.1. 添加用户
14.1.2. 删除用户
14.1.3. 修改用户组
14.1.4. 账号加锁与解锁
14.2. Group
14.2.1. Add a new group
14.2.2. Add a user to the group
14.2.3. /etc/group
14.2.4. gpasswd - administer /etc/group and /etc/gshadow
14.3. 访问权限
14.3.1. umask
14.3.2. chown - change file owner and group
14.3.3. chgrp - change group ownership
14.3.4. chmod - change file access permissions
14.4. chattr - change file attributes on a Linux second extended file system
14.5. su - run a shell with substitute user and group IDs
14.6. runuser - run a command with substitute user and group ID
14.7. sudo, sudoedit - execute a command as another user
14.7.1. /etc/sudoers
14.7.2. /etc/sudoers
14.7.3. 设置示例
14.7.4. NOPASSWD
14.7.5. 允许或禁止命令
14.7.6. Cmnd_Alias 用法
14.7.7. wheel 组
14.7.8. 注意事项
14.8. ACL - Access Control List
14.8.1. getfacl - get file access control lists
14.8.2. setfacl - set file access control lists
15. crontab 定时任务
15.1. /etc/crontab
16. Logging 日志
16.1. rsyslog
16.1.1. rsyslog.conf
16.2. logrotate - rotates, compresses, and mails system logs
16.2.1. /etc/logrotate.conf
16.2.2. /etc/logrotate.d/
16.3. syslog-ng
16.4. syslog, klogctl - read and/or clear kernel message ring buffer; set console_loglevel
16.4.1. /etc/sysconfig/syslog
16.4.2. /etc/syslog.conf
16.4.3. logger
16.4.4. To Log Messages Over UDP Network
16.5. 挂载日志卷
16.5.1. 子卷挂载
16.5.2. 使用过个子卷
16.5.3. /etc/fstab配置
17. kickstart
17.1. install kickstart
17.2. ks.cfg
17.3. boot 参数
18. System Utilities 配置工具
18.1. CentOS 6
18.1.1. system-config-date
18.1.2. system-config-firewall
18.1.3. system-config-securitylevel
18.1.4. system-config-language
18.1.5. system-config-keyboard
18.1.6. system-config-network
18.1.7. ntsysv
18.1.8. lokkit
18.1.9. system-config-kdump
18.1.10. system-config-services
18.1.11. authconfig-tui