Linux(centOS7)学习笔记

本文详细介绍了Linux CentOS7的基础知识,包括文件系统、密码原则、软件包选择和安装日志。重点讲解了各种常用命令,如ls、mkdir、cd、pwd、rmdir、cp、mv、rm等目录和文件处理命令,以及权限管理、文件搜索、用户管理、压缩解压和网络命令的使用。此外,还提到了系统关机重启命令和Linux各个目录的作用。
摘要由CSDN通过智能技术生成

一、Linux文件基础

1、硬件设备文件名

硬件 设备文件名
IDE硬盘 /dev/hd[a-d]
SCSI/SATA/USB/硬盘 /dev/sd[a-p]
光驱 /dev/cdrom或/dev/sr0
软盘 /dev/fd[0-1]
打印机(25针) /dev/lp[0-2]
打印机(USB) /dev/usb/lp[0-15]
鼠标 /dev/mouse

2、文件系统结构

结构树
/
/boot /etc /home
/etc
passwd shadow group

3、密码原则

(1)复杂性

​ 八位字符以上、大小写字母、数字、符号

​ 不能是英文单词

​ 不能是和用户相关的内容

(2)易记忆性

(3)时效性

4、软件包选择

Desktop(桌面)

Minimal Desktop(最小化桌面)

Minimal (最小化)

Basic Server(基本服务器)

Database Server(数据库服务器)

Web Server(网页服务器)

Virtual Host(虚拟主机)

software development workstation(软件开发工作站)

5、安装日志

/root/install.log:存储了安装在系统中的软件包及其版本信息

/root/install.log.syslog:存储了安装过程中留下的事件记录

/root/anaconda-ks.cfg:以Kickstart配置文件的格式记录安装过程中设置的选项信息

6、设置Linux的IP地址

​ 示列:ifconfig eth0 192.168.1.154

7、注意事项

Linux严格区分大小写

Linux中的所有内容以文件的形式保存,包括硬件

硬盘文件是/dev/sd[a-p]

光盘文件是/dev/sr0等

Linux不靠扩展名区分文件类型

压缩包:“*.gz”、“*.bz2”等

二进制软件包:”.rmp“

网页文件:“*.html”

脚本文件:“*.sh”

配置文件:“*.conf”

二、Linux各个目录的作用

目录名 目录作用
/bin/ 存放系统命令的目录,普通用户和超级用户都可以执行,不过放在/bin下的命令在单用户模式下也可以执行
/sbin/ 保存和系统环境设置相关的命令,只有超级用户可以使用这些命令进行系统环境设置,但是有些命令可以允许普通用户查看
/usr/bin/ 存放系统命令的目录,普通用户和超级用户都可以执行,这些命令和系统启动无关,在单用户模式下不能执行
/usr/sbin/ 存放根文件系统不必要的系统管理命令,只有超级用户可以使用
/boot/ 系统启动目录,保存系统启动相关的文件
/dev/ 设备文件保存位置,用来保存所有硬件设备文件
/etc/ 配置文件保存位置,用户的账号等
/home/ 普通用户的家目录
/lib/ 用户调用的函数库保存位置
/lost+found/ 系统意外关机或崩溃时产生的文件碎片保存位置
/media/ 挂载目录,用来挂载媒体设备
/mnt/ 挂载目录,挂载额外设备
/misc/ 挂载目录,用来挂载NFC服务的共享目录
/opt/ 第三方安装的软件保存位置
/proc/ 虚拟文件系统该目录中的数据并不是保存在硬盘中,而是保存在内存中
/sys/ 虚拟文件系统,和/proc目录相似
/root/ 超级用户的家目录
/srv/ 服务器数据目录
Deploy and manage today's essential services on an enterprise-class, open operating system About This Book * Configure and manage Linux servers in varying scenarios and for a range of business requirements * Explore the up-to-date features of CentOS using real-world scenarios * See practical and extensive recipes to deploy and manage CentOS Who This Book Is For This book is for Linux professionals with basic Unix/Linux functionality experience, perhaps even having set up a server before, who want to advance their knowledge in administering various services. What You Will Learn * See how to deploy CentOS easily and painlessly, even in multi-server environments * Configure various methods of remote access to the server so you don't always have to be in the data center * Make changes to the default configuration of many services to harden them and increase the security of the system * Learn to manage DNS, emails and web servers * Protect yourself from threats by monitoring and logging network intrusion and system intrusion attempts, rootkits, and viruses * Take advantage of today's powerful hardware by running multiple systems using virtualization In Detail CentOS is derived from Red Hat Enterprise Linux (RHEL) sources and is widely used as a Linux server. This book will help you to better configure and manage Linux servers in varying scenarios and business requirements. Starting with installing CentOS, this book will walk you through the networking aspects of CentOS. You will then learn how to manage users and their permissions, software installs, disks, filesystems, and so on. You'll then see how to secure connection to remotely access a desktop and work with databases. Toward the end, you will find out how to manage DNS, e-mails, web servers, and more. You will also learn to detect threats by monitoring network intrusion. Finally, the book will cover virtualization techniques that will help you make the most of CentOS. Style and approach This easy-to-read cookbook is filled with practical recipes. Hands-on, task-based exercises will present you with real-world solutions to deploy and manage CentOS in varying business scenarios.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值