ubuntu1804系统基本知识

系统镜像名称:ubuntu-18.04.5-desktop-amd64.iso 
系统内核版本:5.4.0-42-generic (uname -r)
镜像下载地址:magnet:?xt=urn:btih:94A315E2CF8015B2F635D79AAB592E6DB557D5EA (使用迅雷新建下载)

1. 常用命令
更新安装源列表
sudo apt-get update
更新已安装软件
sudo apt-get upgrade
安装python3.8
sudo apt-get install python3.8
查看python3.8安装位置
which python3.8
移除python3.8(保留配置文件)
sudo apt-get remove python3.8
移除python3.8(删除配置文件)
sudo apt-get purge python3.8
移除python3.8(保留配置文件/删除依赖)
sudo apt-get remove --auto-remove python3.8
移除python3.8(删除配置文件/删除依赖)
sudo apt-get purge --auto-remove python3.8
移除/var/cache/apt/archives/ deb包
sudo apt-get clean
sudo apt-get autoclean

查看磁盘剩余空间
df -hl
使用telnet协议连接服务器

telnet ip port 

2. 安装与配置python
安装pip
sudo apt-get install python-pip python-dev build-essential
sudo pip install --upgrade pip
安装pip3
sudo apt-get install python3-pip python3-dev build-essential
配置pip安装源
新建
~/.pip/pip.conf
写入 
[global]
trusted-host = mirrors.aliyun.com
index-url = http://mirrors.aliyun.com/pypi/simple
设置python默认版本
查看已经安装的python版本
ls /usr/bin/python*

设置python版本优先级
sudo update-alternatives --install /usr/bin/python python /usr/bin/python2.7 1
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.6 2
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.6 3
设置python当前版本
sudo update-alternatives --config python

查看已经配置的python版本
sudo update-alternatives --list python


3. 防火墙设置
查看防火墙状态
sudo ufw status
打开防火墙
sudo ufw enable
关闭防火墙
sudo ufw disable


4. 安装与配置google chorme
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo dpkg -i google-chrome-stable_current_amd64.deb

5. 安装与配置wireshark
sudo groupadd wireshark
sudo chgrp wireshark /usr/bin/dumpcap
sudo chmod 4755 /usr/bin/dumpcap
sudo gpasswd -a xinglei wireshark

6. 安装搜狗拼音输入法(仅限在ubuntu-18.04.5中安装)
下载页面:https://pinyin.sogou.com/linux/?r=pinyin
安装方法:https://pinyin.sogou.com/linux/help.php

 

 

 


 

 

 

 

 

 

猜你喜欢

转载自blog.csdn.net/qq_34473570/article/details/113689129