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/

相关推荐
韩楚风1 小时前
【linux 多进程并发】linux进程状态与生命周期各阶段转换,进程状态查看分析,助力高性能优化
linux·服务器·性能优化·架构·gnu
陈苏同学1 小时前
4. 将pycharm本地项目同步到(Linux)服务器上——深度学习·科研实践·从0到1
linux·服务器·ide·人工智能·python·深度学习·pycharm
Ambition_LAO1 小时前
解决:进入 WSL(Windows Subsystem for Linux)以及将 PyCharm 2024 连接到 WSL
linux·pycharm
Pythonliu71 小时前
茴香豆 + Qwen-7B-Chat-Int8
linux·运维·服务器
你疯了抱抱我1 小时前
【RockyLinux 9.4】安装 NVIDIA 驱动,改变分辨率,避坑版本。(CentOS 系列也能用)
linux·运维·centos
追风赶月、1 小时前
【Linux】进程地址空间(初步了解)
linux
栎栎学编程1 小时前
Linux中环境变量
linux
我是哈哈hh2 小时前
专题十_穷举vs暴搜vs深搜vs回溯vs剪枝_二叉树的深度优先搜索_算法专题详细总结
服务器·数据结构·c++·算法·机器学习·深度优先·剪枝
郭二哈2 小时前
C++——模板进阶、继承
java·服务器·c++
挥剑决浮云 -2 小时前
Linux 之 安装软件、GCC编译器、Linux 操作系统基础
linux·服务器·c语言·c++·经验分享·笔记