Linux一句话总结

1、Linux相关知识点php

Linux中的namespace(命名空间)     SELINUX工做原理   Linux改终端前缀 详细查看LInux系统信息   Telnet和ssh的区别    Linux 包管理基础(apt、yum、dnf)     linux中帮助参数 man whatis which info区别  Linux命令行下链接WiFi  虚拟机固定IP地址   linux 上ssh的原理  linux下添加shellinabox(web ssh)   设置Ubuntu笔记本关闭盖子不休眠  LInux经过yum安装、卸载等  LinuxSSH工具    centos7 telnet服务的安装和启动  CPU性能监控   给shell脚本传参数   vim操做详解  Linux脚本规范 /bin/bash^M: 坏的解释器问题(dos2unix命令也能够解决这个问题)   linux下的source命令与./区别   Linux脚本赋值与传参方法  linux if多条件判断  bash中的运算符  linux下的 eth0,lo ,virbr0, 网卡    linux中的第二(secondary)ip  经过net-tools和ip管理linux网络  关于grep, egrep,fgrep   linux shell命令执行顺序   cache,buff的区分   putty、xshell、github、Linux之间秘钥登陆:1 2  3 4) 关于非对称加密算法的理解   Centos7配置JAVA_HOME  shell脚本修改配置文件    linux下tomcat的shutdown命令杀不死进程  Shell脚本的最佳实践  cenOS7(mail)内部邮件系统相关   Linux使echo命令输出结果带颜色  SHELL中的数组  Shell中的case语句   ubuntu开机自动执行脚本   Linux初始root密码设置    CentOS怎样安装Python3.6    su、su -和sudo的区别   Ubuntu默认root登陆  vim8.1安装教程   centos下dnsmasq安装与配置     CentOS7 安装 Docker 和 Docker-compose   ./configure && make && make install详解   centOS7相关网络配置    Centos下出现read-only file system 的解决办法  CentOS Linux解决Device eth0 does not seem to be present  Linux启动php服务  linux清空文件内容的三种方法 shell中删除文件中重复行的方法  grep 没法搜索shell 传递的变量?   centos8和centos7中网络配置的区别  Linux三剑客之grep,sed,awk  html

2、基本Linux操做(命令与快捷键)  linux

1)经常使用快捷操做:ctrl+c 强制终止;   ctrl+l 清屏 ;   ctrl+a 光标移动到命令首字母;   ctrl+e光标移动到命令末尾字母;   ctrl+u从光标位置删除至首字母 ;   ctrl+z运行的命令放入后台 ;   ctrl+r 在历史命令中搜索 ;git

2)Linux用户管理:添加:useradd 修改:usermod 设置密码:passwd    添加组:groupadd 修改组:groupmod 查看有哪些组:groups (参考连接1   参考连接2 github

3)Linux文件管理:cat,more,less,tail,touch,cp,scp,mv,rm,chown, chmod,   stat:查看文件的相关时间web

4)Linux数据操做:vi,vim,awk,sed,grep,>,>>,|,算法

5)Linux系统管理: service,systemctl,ssh,su,sudo,(apt、yum、dnf包管理),lsof,shoptdocker

6)Linux网络管理:nmap,ip,ifconfig,netstat,net,route,nslookup,ping,shell

7) Linux系统性能监控:top,vmstat,free,cat /etc/cpuinfo,w, uptime,cat ,/proc/loadavg,tload, (二十个性能分析工具汇总)ubuntu

 8)50个Linux经常使用命令

3、Linux操做系统相关配置

1)CentOS现有的虚拟机是没有办法联网的,得先配置网络:vi /etc/resolv.conf 添加:nameserver 8.8.8.8 再 vi /etc/sysconfig/network-scripts/ifcfg-ens33 修改:ONBOOT=NO 改为 ONBOOT=yes 再:service network restart 重启网络能够链接外网, 再  yum -y install net-tools   安装网络工具查看IP。若是系统网络没法重启,须要查看修改/etc/sysconfig/network文件中的类容,而后重启: systemctl restart NetworkManager。 再根据须要:yum -y groupinstall "GNOME Desktop" 添加图形界面。 

2) 修改机器别名:一、(centOS)直接 sudo hostnamectl set-hostname <newhostname>  二、(其余Linux)一处是 /etc/sysconfig/network,另外一处是  /etc/hosts(或/etc/hostname)   127.0.0.1 localhost.localdomain localhost 。将localhost.localdomain 改成本身主机名便可。 还须要重启网络,第一步最关键。

3)centos  7关闭防火墙systemctl stop firewalld.service #中止firewall     systemctl disable firewalld.service #禁止firewall开机启动。若是是Ubuntu关闭、开启防火墙:ufw disable  、enable 禁止、启动启动:sudo ufw allow、deny 参考连接  

4)Linux下变量生效方式:

一、全部用户永久生效:编辑/etc/profile 加入相应的行 而后,【source /etc/profile】 可当即且对全部用户有效(source命令也称为“点命令”,也就是一个点符号(.),是bash的内部命令。用户初始化,刷新文件,没必要须要文件有执行权限)
二、编辑/home/{username}/.bash.profile 加入相应的行,便针对当这个用户永久有效
三、只让变量在当前环境有效的方法:export CLASSPATH=./JAVA_HOME/lib;$JAVA_HOME/jre/lib 退出后便没有效果了。
四、source的设置可让环境文件依次执行,至关于启动批处理程序

5)知识点记录:一、 linux修改IP  vi /etc/network/interfaces (root) 二、除去Linux中脚本的注释:egrep -v '(^$|^#)'   ****.file

6)Ubuntu上开机启动的方式:  一、建立并添加添加脚本到/etc/init.d/中,二、修改/etc/rc.local,添加须要使用的脚本 三、使用update-rc.d %/etc/rc.local中的脚本名称% defaults 90 来添加开机启动项。 注意:ubuntu 18.04版开机启动相关设置:用 systemctl 命令来替换了 service 和 chkconfig 的功能。
参考连接1参考连接2参考连接3:)   关于bashrc与profile

7) Linux 下设置别名缩短命令  ( vi /root/.bashrc 当前root永久生效,去掉alias:unalias vi )   Linux: 传参数给alias

8) Linux传递参数、赋值、判断参数为空的例子:

para1=$1
if [ ! $para1 ]; then
  echo "you have input NULL, please input the master's IP after the shell!  Like:  ./*.sh 192.168.1.1"
else
 read -p " The master's IP is =>>  $para1 <<== ? If not, please Ctrl+c and input again! If yes,ENTER to continue."
fi
View Code

 9) Linux之间ssh登录:1,ssh-keygen -t rsa  ~/.ssh目录下产生的id_rsa.pub内容复制到须要远程的机器的~/.ssh/authorized_keys 中,若是没有authorized_keys就建立。或者不登陆远程机器,直接经过ssh-copy-id -i ~/.ssh/id_rsa.pub {user}@{ip}  登录。

10)Linux上软件:关于LNMP的配置详解  

11)vim全局替换::%s/vivian/sky/g

 

四,Linux疑难问题解决:ubuntu软件包间的依赖关系问题   centos5中root密码破解  centos6中root密码破解   centos7中root密码破解  centos8中root密码破解

相关文章
相关标签/搜索