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/

相关推荐
梦痕长情21 分钟前
等保三级三权账户
linux·运维·服务器
wuqingshun3141591 小时前
说说TCP的3次握手?为什么需要三次握手?
服务器·网络协议·tcp/ip
CHANG_THE_WORLD1 小时前
1.简单的服务端和客户端(仅作为内容补充)
linux·服务器·网络
jiecy1 小时前
为Linux系统双网卡配置静态路由
linux·运维
CodexDave2 小时前
数据库连接池耗尽:排查顺序与三层兜底
服务器·前端·数据库·git·云原生·容器·kubernetes
weixin_307779132 小时前
Linux下Jenkins数据故障的系统化排查Shell脚本
linux·运维·服务器·jenkins
荒--2 小时前
Burp Suite(二)
linux·运维·服务器
YangYang9YangYan2 小时前
2026自动化背景无项目经验转数据分析的可行性分析
运维·数据分析·自动化
土星云SaturnCloud3 小时前
MP_SENet轻量语音降噪模型在土星云边缘设备的部署实战
服务器·人工智能·ai·边缘计算·语音识别