![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
linux学习
文章平均质量分 72
lingfeng1897
这个作者很懒,什么都没留下…
展开
-
13. su sudo 限制root远程登录
3.7 su命令su - run a command with substitute user and group IDWhen called without arguments su defaults to running an interactive shell as root.It is recommended to always use the --login op原创 2017-12-29 01:27:49 · 144 阅读 · 0 评论 -
14. df du 磁盘分区
4.1 df命令df - report file system disk space usagedf displays the amount of disk space available on the file system containing each file name argument.If no file name is given, the space ava原创 2017-12-29 09:58:35 · 153 阅读 · 0 评论 -
17. vim
5.1 vimVi IMproved, a programmers text editorVim is a text editor that is upwards compatible to Vi. It can be used to edit all kinds of plain text. It is especially useful for editing原创 2018-01-04 09:54:10 · 192 阅读 · 0 评论 -
15.磁盘格式化 磁盘挂载 手动增加swap空间
4.5 磁盘格式化# cat /etc/filesystems # mount | grep /dev/sda/dev/sda3 on / type xfs (rw,relatime,seclabel,attr2,inode64,noquota)/dev/sda1 on /boot type xfs (rw,relatime,seclabel,attr2原创 2017-12-30 09:58:33 · 1482 阅读 · 0 评论 -
18. 打包压缩
6.1 压缩打包介绍6.2 gzip压缩工具gzip, gunzip, zcat - compress or expand files# gzip 1.txt-d --decompress --uncompressDecompress.# gzip -d 1.txt.gz -# --fast --bestRegul原创 2018-01-06 09:58:45 · 471 阅读 · 0 评论 -
19. 软件包安装和卸载
7.1 安装软件包的三种方法rpm工具yum工具源码包7.2 rpm包介绍# mount /dev/cdrom /mnt/mount: /dev/sr0 写保护,将以只读方式挂载abrt-2.1.11-48.el7.centos.x86_64.rpm包名-版本号-发布版本号.平台.rpm7.3 rpm工具用法原创 2018-01-10 02:05:58 · 259 阅读 · 0 评论 -
22. sed
sed - stream editor for filtering and transforming textSYNOPSISsed [OPTION]... {script-only-if-no-other-script} [input-file]...DESCRIPTIONSed is a stream editor. A stream editor is use原创 2018-01-25 18:42:20 · 408 阅读 · 0 评论 -
20. shell基础
8.1 shell介绍shell是一个命令解释器,提供用户和机器之间的交互CentOS7默认shell为bash(Bourne Agin Shell)8.2 命令历史# echo $HISTFILE/root/.bash_history# echo $HISTSIZE1000# grep 1000 /etc/pro原创 2018-01-13 22:36:03 · 248 阅读 · 0 评论 -
23. awk
awk ' pattern {action} '# head -5 passwdroot:x:0:0:root:/root:/bin/bashbin:x:1:1:bin:/bin:/sbin/nologindaemon:x:2:2:daemon:/sbin:/sbin/nologinadm:x:3:4:adm:/var/adm:/sbin/nologinlp:x原创 2018-01-29 23:43:17 · 159 阅读 · 0 评论 -
LAMP架构介绍 MySQL_MariaDB介绍 MySQL安装 MariaDB安装
11.1 LAMP架构介绍11.2 MySQL_MariaDB介绍MySQL是一个关系型数据库,由mysql ab公司开发,mysql在2008年被sun公司收购(10亿刀),2009年sun公司被oracle公司收购(74亿刀)MySQL官网https://www.mysql.com 最新版本5.7GA/8.0DMRMySQL5.6变化比较大,5.7性原创 2018-02-27 11:36:07 · 248 阅读 · 0 评论 -
安装Apache 安装PHP5&7 Apache和PHP结合
11.7 Apache安装# wget http://mirrors.cnnic.cn/apache/httpd/httpd-2.4.28.tar.gz# wget http://mirrors.hust.edu.cn/apache/apr/apr-1.6.3.tar.gz# wget http://mirrors.hust.edu.cn/apache/apr/apr-ut原创 2018-03-01 01:00:56 · 1045 阅读 · 0 评论 -
21. grep
grep, egrep, fgrep -print lines matching a patterngrep [-cinrvABC] 'word' filename # grep nologin passwd | head -5bin:x:1:1:bin:/bin:/sbin/nologindaemon:x:2:2:daemon:/sbin:/sbin/nolo原创 2018-01-22 02:10:55 · 165 阅读 · 0 评论 -
12. usermod passwd mkpasswd
3.4 usermod命令usermod - 修改一个用户账户-d, --homeHOME_DIR用户的新登录目录-g, --gidGROUP用户的新初始登录组的组名或数字代号。此组必须存在。用户主目录中,属于原来的主组的文件将转交新组所有。主目录之外的文件所属的组必须手动修改。-G, --groupsGROUP1[,GROUP2,.原创 2017-12-28 09:55:44 · 304 阅读 · 0 评论 -
11.用户配置文件 密码配置文件 groupadd groupdel useradd userdel
3.1 用户配置文件和密码配置文件用户名:密码(已废弃):UID:GID:注释:用户家目录:用户的shell(/sbin/nologin:禁止登录)# head -2 /etc/passwd; tail -2 /etc/passwdroot:x:0:0:root:/root:/bin/bashbin:x:1:1:bin:/bin:/sbin/nologina原创 2017-12-27 09:58:48 · 333 阅读 · 0 评论 -
7.环境变量 cp mv cat more less head tail
2.10 环境变量PATH# echo $PATH/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin# echo "PATH=$PATH:/tmp" >> /etc/profileEnvironment stuff goes in /etc/profileSystem原创 2017-12-20 01:38:05 · 182 阅读 · 0 评论 -
8. chmod chown umask lsattr chattr
2.14 更改文件或目录权限chmod - change file mode bitschmod [OPTION]... MODE[,MODE]... FILE...-R, --recursivechange files and directories recursively# ll test/ -ddrwxr-xr-x. 2 root root 2原创 2017-12-21 00:45:38 · 228 阅读 · 0 评论 -
9. SUID SGID SBIT LINKS
2.18 特殊权限set_uid# ll /usr/bin/passwd-rwsr-xr-x. 1 root root 27832 6月 10 2014 /usr/bin/passwd设置条件:1.二进制文件 2.文件具有执行权限# ll /usr/bin/ls-rwxr-xr-x. 1 root root 117656 11月 6 2016 /usr/原创 2017-12-22 01:35:28 · 162 阅读 · 0 评论 -
3.远程连接虚拟机
1.9 使用putty远程连接linux打开putty,填入虚拟机的ip,端口一般为22,并将其保存为一个会话,命名,保存一下,点open即可连接一些优化配置:回滚行数:传输字符集:1.10 使用Xshell连接linux和putty类似,新建一个会话:填入会话名称,虚拟机ip,端口号,点确定保存即可连接还可以直接填入用户原创 2017-12-15 08:39:01 · 2051 阅读 · 0 评论 -
10. find
qwe原创 2017-12-23 08:40:24 · 138 阅读 · 0 评论 -
4.故障恢复与备份
1.13 单用户模式重启linux:reboot init 6 shutdown -r now关闭linux:poweroff init 0 shutdown now halt -pshutdown [OPTIONS...] [TIME] [WALL...]The first argument may be a time string (which is u原创 2017-12-15 09:56:54 · 287 阅读 · 0 评论 -
5 系统目录结构 ls 文件类型 alias
2.1/2.2 系统目录结构yum -y install treetree - list contents of directories in a tree-like format.-L levelMax display depth of the directory tree.# tree -L 2 //├── bin -> usr/bin原创 2017-12-18 09:58:20 · 235 阅读 · 0 评论 -
6. cd mkdir rmdir rm
2.7 cd命令cd Change the shell working directory.cd - 回到上一次目录cd 回到当前用户家目录cd ~ 回到当前用户家目录cd .. 回到上一级目录2.8 创建和删除目录mkdir rmdirmkdir-p, --parentsno error if existing, make pa原创 2017-12-19 09:55:50 · 159 阅读 · 0 评论 -
16. lvm 磁盘故障小案例
4.10 lvm1.准备磁盘分区:fdisk /dev/sdbn 创建三个新分区,分别1Gt 改变分区类型为8e2.准备物理卷pvcreate /dev/sdb1pvcreate /dev/sdb2pvcreate /dev/sdb3pvdisplay/pvs 列出当前的物理卷pvremove /d原创 2018-01-03 09:57:24 · 1469 阅读 · 0 评论 -
Apache默认虚拟主机 Apache用户认证
11.16 Apache默认虚拟主机# vim /usr/local/apache2.4/conf/httpd.conf# Virtual hostsInclude conf/extra/httpd-vhosts.conf# vim /usr/local/apache2.4/conf/extra/httpd-vhosts.conf# Almost原创 2018-03-05 18:12:28 · 426 阅读 · 0 评论