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/

相关推荐
派葛穆10 分钟前
Ubuntu-软件安装和执行
linux·运维·ubuntu
AlickLbc24 分钟前
WSL2安装Ubuntu与Claude Code记录
linux·运维·ubuntu
青天喵喵35 分钟前
Linux WiFi 架构解析:连接流程(基础篇二)
linux·运维·架构·嵌入式·wi-fi·sta·ap
Bug-制造者41 分钟前
正则表达式 vs Shell通配符:彻底分清,告别命令行踩坑
linux·正则表达式
雨的旋律20991 小时前
linux网卡绑定bond设置一步不少
linux·运维·网络
OpenAnolis小助手1 小时前
Anolis OS Linux Dirty Frag 漏洞安全声明
linux·安全·web安全·龙蜥社区
MXsoft6181 小时前
**国产化环境下运维平台如何做到全栈适配、自主可控?**
运维
北山有鸟1 小时前
解决香橙派没有适配ov13855的3A算法
linux·c++·相机·isp
是垚不是土1 小时前
PostgreSQL 运维工程师 “一本通“ :安装、配置、备份与监控
linux·运维·数据库·postgresql·运维开发
Irene19911 小时前
在 Linux 命令中,- 开头的东西几乎都是“参数/选项“,用来告诉命令“具体怎么做“
linux