Ubuntu ???????Python????????
????????????? ???????[ 2017/6/22 13:22:52 ] ?????????????? Linux
??????????Ubuntu 16.04
??????????????????????????????????????????????????????
????1 ???Ubuntu????
????Ubuntu?????????????????????????????????????????????????????????????????????????????????Щ????????????廩?????????????
????1.1 ????????????б?
sudo cp /etc/apt/sources.list /etc/apt/sources.list_backup
????1.2 ???????????????
???????????/etc/apt/source.list
sudo vi /etc/apt/sources.list
????????????????????????????????????
????# ?????????????????? apt update ???????????????????????
????deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial main restricted universe multiverse
????# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial main restricted universe multiverse
????deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse
????# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse
????deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse
????# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse
????deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security main restricted universe multiverse
????# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security main restricted universe multiverse
????# ?????????????????????
????# deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-proposed main restricted universe multiverse
????# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-proposed main restricted universe multiverse
????2 ???????
????????????б?
sudo apt-get update
???????±??????
??sudo apt-get upgrade
????3 ?????????
?????????????????????root?????????root?????к??????????ζ????и???????????????????????????????????????????????????????????????sudo???????????
????????????????????????????'xiaoming'
?????????????????????????
??useradd -m xiaoming
????????????????
passwd xiaoming
?????л??????????????????????
??su - xiaoming
??????????????賬??????????
??sudo usermod -a -G adm xiaoming
??sudo usermod -a -G sudo xiaoming
????4 ????????ssh?????
???????ssh????
??sudo apt-get install openssh-server
????????ssh????
sudo /etc/init.d/ssh start
??????????IP???
????inet??κ?????????IP???
sudo ifconfig
?????????
??????????????????????
ssh <username>@<server IP>
?????????????????????????????IP????xiaoming??192.168.1.1????????滻??????????治?????
ssh xiaoming@192.168.1.1
????5 ssh??????????
????5.1 ?????????????
??????ε??????????????????????????鷳??????IP???????ü???????????.bashrc????????????????????
?????????????????????.bashrc???????
sudo vi ~/.bashrc
????????????????????
alias server='ssh xiaoming@192.168.1.1'
??????????????????????????????????????????????????
??source ~/.bashrc
??????????????????server?????????????????
????5.2 ????????
??????ε???????????????????????鷳??????????????????????????????????????????鷳?????????
????5.2.1 ?????????
???????????????????????????
ssh-keygen
?????????????????
??Generating public/private rsa key pair.
??Enter file in which to save the key (/home/python/.ssh/id_rsa):
???????enter?????
?????????????????????????????????????????????enter????????????????????????????????????????????????鷳
?????л??????????
cd ~/.ssh/
?????????????????????id_rsa????id_rsa.pub????~/.ssh??????????????ζ??????????????id_rsa
????5.2.2 ????????????????
???????????????????????????
ssh-copy-id xiaoming@192.168.1.1
????5.3 Done!
??????????????????????????????????????????????ssh???????????????
????server
????6 ?????汾Python
???????python2
sudo apt-get install python
??????python2?汾
python --version
???????python3
????sudo apt-get install python3
??????python3?汾
python3 --version
????7 ?????汾pip
???????pip2
sudo apt-get install python-pip
???????pip3
sudo apt-get install python3-pip
????8 ???ipython
???????ipython2
??pip2 install ipython
???????ipython3
??pip3 install ipython
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11