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/

相关推荐
zfxwasaboy4 小时前
Linux宏clamp(val, lo, hi)的作用
linux·运维·服务器
apl3595 小时前
论DevOps、平台工程的核心:配置管理与依赖管理
运维·devops
我爱学习好爱好爱5 小时前
Ansible 常用模块详解:lineinfile、replace、get_url实战
linux·python·ansible
kida_yuan6 小时前
【以太来袭】6. Besu 的 API 与调试体系
运维·区块链
吴声子夜歌6 小时前
TypeScript——基础类型(三)
java·linux·typescript
DA02217 小时前
系统移植-STM32MP1启动详解(BootROM)
linux·bsp·系统移植
春日见7 小时前
自驾算法的日常工作?如何提升模型性能?
linux·人工智能·机器学习·计算机视觉·自动驾驶
李彦亮老师(本人)7 小时前
【Linux系统】Rocky Linux 9.7操作系统简介
linux·运维·服务器·docker·kubernetes
minji...7 小时前
Linux 进程信号(二)信号的保存,sigset_t,sigprocmask,sigpending
linux·运维·服务器·网络·数据结构·c++·算法
A.A呐7 小时前
【Linux第二十章】socket
linux