Linux 基础操作手记四

文章目录

环境变量生效

source ~/.bashrc # 或 source ~/.zshrc

配置python版本
bash 复制代码
sudo add-apt-repository ppa:deadsnakes/ppa
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.8 1
sudo update-alternatives --install /usr/bin/python python /usr/bin/python2.7 2
sudo update-alternatives --config python


python -V

安装SSH

检测ssh
systemctl status ssh

安装SSH
sudo apt install openssh-server

再次启动
systemctl status ssh

查看IP
hostname -I

检测服务开启
ping 192.168.195.128

登录
ssh maqi@192.168.195.128 -p 22

编辑端口

gedit /etc/ssh/sshd_config

方式二

  1. VMWare虚拟机SSH配置
  2. 连接
关闭GUI

关闭用户图形界面,使用tty登录。

bash 复制代码
sudo systemctl set-default multi-user.target
sudo reboot

开启用户图形界面。

bash 复制代码
sudo systemctl set-default graphical.target
sudo reboot

内存对比
左边GUI开启时,占用3.5G ,实际使用会到7G左右

右边关闭时只占用了

vi 清空

:.,$d

https://sysin.org/blog/ubuntu-remove-snap/

相关推荐
翼龙云_cloud8 分钟前
阿里云渠道商:如何使用弹性伸缩来实现计算资源的弹性配置?
服务器·阿里云·云计算
05大叔38 分钟前
大事件Day02
运维·服务器
五仁火烧1 小时前
Vue3 项目的默认端口行为
服务器·vue.js·nginx·容器·vue
C Yu小白1 小时前
Linux系统调用与文件操作详解
linux·运维·服务器
ZFB00011 小时前
【麒麟桌面系统】V10-SP1 2503 系统知识——常见用户组简介
linux·运维·kylin
acrelgxy1 小时前
告别被动抢修与盲目巡检!安科瑞运维云平台,让电力系统实现预测性守护。
运维·电力监控系统·智能电力仪表
EndingCoder2 小时前
类的继承和多态
linux·运维·前端·javascript·ubuntu·typescript
Anyexyz2 小时前
【更新】境内 Docker 镜像状态监控——配置生成,一键复制!
运维·docker·容器
信创天地2 小时前
深耕金融政务核心场景:国产化数据库迁移的全流程架构设计与风险管控
运维·网络安全·系统架构·系统安全·运维开发
ZFB00012 小时前
【麒麟桌面系统】V10-SP1 2503 系统知识——添加用户
linux·运维·kylin