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 小时前
33:HSMS over TCP/IP 通信原理与配置
运维·自动化
以太浮标10 小时前
华为eNSP模拟器综合实验之- 路由黑洞场景解析及实验
运维·网络·网络协议·网络安全·华为·智能路由器·信息与通信
bloglin9999910 小时前
TabClaw(交互式表格分析 AI 智能体)在线下载,离线部署
linux·运维·服务器·tabclaw
云栖梦泽10 小时前
WIFI通信测试
linux·运维·服务器·压力测试
志栋智能10 小时前
超自动化巡检:在混合云时代更显其必要性
大数据·运维·网络·人工智能·自动化
Dlrb121110 小时前
Linux系统编程-进程回收
linux·exec·进程·进程回收
妖怪喜欢风11 小时前
connecthomeip/matter 专栏文章汇总
linux·matter
wefg111 小时前
【Linux】网络高级 IO
linux·运维·服务器
码云骑士11 小时前
为何VMware上云之路充满挑战?
运维·服务器·php