ubuntu命令和软件安装

1.ping 

apt-get install iputils-ping -y

2.ifconfig

apt-get install net-tools -y

3.ssh

apt-get install openssh-server -y

#配置

vim /etc/ssh/sshd_config


修改:
#Port 22 为 Port 22
#PermitRootLogin prohibit-password  为 PermitRootLogin yes
#StrictModes yes 为 StrictModes yes

#启动

service ssh start

4.vim

apt-get install vim -y

5.apt-get

apt-get update

6.python3.7

1.下载包&&安装依赖
https://www.python.org/ftp/python/3.7.4/Python-3.7.4.tgz

apt-get install build-essential -y
apt-get install  zlib* -y
apt-get install libffi-dev -y

2.解压
tar -zxvf Python-3.7.4.tgz -C /usr/local

3.
cd /usr/local

4.修改文件夹名称
mv Python-3.7.4 python3.7.4

5.
cd python3.7.4

6.
./configure

(如果有提示  please run ./configure --enable-optimizations)
则运行./configure --enable-optimizations  否则略过

7.编译并安装
make && make install

8.测试
python3.7 看看能否进入python3.7 

9.修改软连接
mv /usr/bin/python /usr/bin/python.bak
ln -s /usr/local/bin/python3.7 /usr/bin/python
mv /usr/bin/pip /usr/bin/pip.bak
ln -s /usr/local/bin/pip3 /usr/bin/pip

10.测试
python  看看能否进入pyhont3.7

7.时间设置,校验时间

1.安装
apt-get install tzdata -y

2.编辑timezone
vim /etc/timezone
里面内容是:Asia/Shanghai

3.
rm -f /etc/localtime

4.
dpkg-reconfigure -f noninteractive tzdata

8.pip更改源

1.检查pip.conf文件是否存在
ls ~/.pip

有看看里面是否有这个文件,如果没有,自己创建一个

2.修改成阿里云源

vim pip.conf
添加

[global]
index-url = http://mirrors.aliyun.com/pypi/simple/
[install]
trusted-host = mirrors.aliyun.com

9.中文乱码

1.安装中文包
    apt-get install language-pack-zh-hans -y

2.在/etc/environment 添加
    LANG="zh_CN.UTF-8"
    LANGUAGE="zh_CN:zh:en_US:en"
3.在/var/lib/locales/supported.d/local 添加
    en_US.UTF-8 UTF-8
    zh_CN.UTF-8 UTF-8
    zh_CN.GBK GBK
    zh_CN GB2312
4.刷新
    locale-gen

5.中文空格问题
    apt-get install fonts-droid-fallback ttf-wqy-zenhei ttf-wqy-microhei fonts-arphic-ukai fonts-arphic-uming -y


原文:https://blog.csdn.net/weixin_39792252/article/details/80415550

 

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值