Linux命令篇

  1. rpm命令
    RPM是RedHat Package Manager(RedHat软件包管理工具)类似Windows里面的“添加/删除程序”
    rpm -qa | grep httpd      #[搜索指定rpm包是否安装]
    rpm -e          #移走一个包

  2. 查看linux系统版本
    cat /etc/issue
    cat /etc/issuecat /etc/issue
    在这里插入图片描述

  3. 安装Yum
    找了很多资料,什么简洁办法都不管用,还是需要下载很多依赖包安装才行。参考如下
    https://blog.csdn.net/zgege/article/details/82315110
    但是由于yum的版本与当前python的版本不一致会报错?

    There was a problem importing one of the Python modules required to run yum. The error leading to this problem was:

    No module named yum

    Please install a package which provides this module, or verify that the module is installed correctly.

    It’s possible that the above module doesn’t match the current version of Python, which is:
    。。。
    解决办法:更改配置python引用指向低版本(更改yum配置,因为其要用到python2才能执行,否则会导致yum不能正常使用)。http://www.cnblogs.com/blueel/archive/2012/08/19/2646127.html

vi /usr/bin/yum
把#! /usr/bin/python修改为#! /usr/bin/python2
4. 为GitLab帐号添加SSH keys并连接GitLab
https://blog.csdn.net/qq_21916259/article/details/81000723
密匙生成成功之后,复制 .ssh目录下的id_rsa.pub文件中的密匙,添加gitLab上后就可以使用git clone …了
可以设置多个设备的秘钥,实现多设备共享。
在这里插入图片描述

  1. yum和apt-get的区别

yum和apt-get的区别

一般来说著名的linux系统基本上分两大类: 
	1.RedHat系列:Redhat、Centos、Fedora等 
	2.Debian系列:Debian、Ubuntu等 
RedHat 系列 
1 常见的安装包格式 rpm包,安装rpm包的命令是“rpm -参数” 
2 包管理工具 yum 
3 支持tar包 
Debian系列 
1 常见的安装包格式 deb包,安装deb包的命令是“dpkg -参数” 
2 包管理工具 apt-get 
3支持tar包

6. 进程管理
netstat -nap
在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/super_chenly/article/details/87923167
今日推荐