Linux 操作共9篇
L43※Putty使用密钥登陆SSH-霜林轩

L43※Putty使用密钥登陆SSH

1> 使用putty生成公钥和私钥 2> 配置远程主机 将上一步保存的公钥保存在~/.ssh/authorized_keys文件中 chmod 400 ~/.ssh/authorized_keys 3> 使用sudo时不输入密码 在/etc/sudoers文件中增加(u...
slzxf的头像-霜林轩slzxf2年前
0872
L24※Centos 升级gcc版本-霜林轩

L24※Centos 升级gcc版本

1> 卸载原来的旧版本 ① 查看当前的版本号 rpm -q gcc ② 卸载掉旧版本 rpm -e [上一步查到的版本号] ③ 如果上一步报错 error: Failed dependencies: gcc = 4.8.5-44.el7 is needed by ...
slzxf的头像-霜林轩slzxf2年前
551
L33※镜像源-霜林轩

L33※镜像源

1> python 国内镜像源 ① 手动配置 vim /root/.pip/pip.conf [global] index-url = https://pypi.tuna.tsinghua.edu.cn/simple [install] trusted-host = https://pypi.tuna.tsinghu...
slzxf的头像-霜林轩slzxf3个月前
1321
L39※禁止Debian 11自动休眠-霜林轩

L39※禁止Debian 11自动休眠

1> 查看休眠状态 systemctl status sleep.target 2> 设置禁止休眠 systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target
slzxf的头像-霜林轩slzxf2年前
1191
L08※定时执行文件-霜林轩

L08※定时执行文件

1> 设置个人任务调度 crontab -e 30 8 * * * /usr/local/anaconda3/bin/python3 /data/jupyter/scrapy/weather.py 项目含义范围第一个*一小时当中的第几分钟0-59第二个*一天当中的第几个小时...
slzxf的头像-霜林轩slzxf2年前
561
L14※ubuntu 修改ip地址-霜林轩

L14※ubuntu 修改ip地址

1> ubuntu 18.04 ① 修改配置文件/etc/network/interfaces vim /etc/network/interfaces auto lo iface lo inet loopback auto eth0 #设置自动启动eth0接口,eth0根据ifconfig中的网卡名进行...
slzxf的头像-霜林轩slzxf2年前
1421
L17※ubuntu开启root登录-霜林轩

L17※ubuntu开启root登录

1> 设置 root 账户密码 sudo passwd root 2> 修改 .profile vim /root/.profile # mesg n || true tty -s && mesg n || true 3> 修改 gdm-autologin 和 gdm-password cd /etc/...
slzxf的头像-霜林轩slzxf2年前
941
L18※ubuntu挂载新硬盘-霜林轩

L18※ubuntu挂载新硬盘

1> 查找新添加的盘符 # root用户 fdisk -l # 查看新硬盘 blkid # 定位或打印块设备的属性,查看硬盘uuid 2> 格式化新硬盘文件系统: mkfs -t ext4 /dev/sda 3> 挂载硬盘...
slzxf的头像-霜林轩slzxf2年前
1271
L19※ubuntu设置开机不启动图形界面-霜林轩

L19※ubuntu设置开机不启动图形界面

1> 开机不启动图形界面 sudo systemctl set-default multi-user.target sudo shutdown -r now 2> 从控制台进入图形界面 sudo systemctl start gdm3.service 3> 恢复开机启动图形界面 s...
slzxf的头像-霜林轩slzxf2年前
5661