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/

相关推荐
Decay__3 小时前
17_MySQL 监控体系构建 —— mysqld_exporter + Prometheus + Grafana 全栈实战
运维·数据库·sql·mysql·架构
ITKEY_3 小时前
emacs 文件管理Dired, the Directory Editor
linux·编辑器·emacs
天远数科3 小时前
零信任架构实战:基于天远全能家政风险报告构建自动化即时到家保洁与短工抢单安全核验网关
运维·人工智能·架构·自动化
源图客3 小时前
解决CentOS操作系统网络异常问题
linux·运维·centos
分布式存储与RustFS4 小时前
K8s 集群备份落到自建对象存储:Velero 接 RustFS 配置指南
运维·云原生·开源·对象存储·分布式存储·s3·性能基准
Liuqy-054 小时前
IO模型与并发服务器
服务器·网络·select·多线程·epoll·并发服务器·io多路复用
镜子AI13 小时前
镜子AI 技术复盘:三条自动化链路上的“停止条件“设计
运维·人工智能·自动化
tianyuanwo13 小时前
NetBox 数据库详解:当“关系型数据库”被装进一个网络运维的领域模型里
运维·数据库·netbox
HideF13 小时前
Linux sudo
linux
FlightYe14 小时前
视界原理之3D视频(四):裸眼、眼镜和头显
android·linux·c++·3d·ffmpeg·音视频