修改vim的配置 Linux

vimrc 是 Vim 的配置文件,用于自定义 Vim 的行为和外观。在 Unix-like 系统中,它通常位于用户的主目录下,文件名为 .vimrc。在 Windows 系统上,它可能位于用户主目录下,也可以是 _vimrc。

你可以使用文本编辑器打开该文件,然后在其中添加或修改配置项,以便满足你的需求。以下是一些可能包含在 .vimrc 中的常见配置项和示例:

标签: linux

wen 发布于  2024-1-26 11:49 

Linux 开启root远程链接 Linux

修改root用户的远程登录设置同样涉及到SSH配置。请注意,为了系统的安全性,强烈建议不直接允许root用户通过SSH远程登录。相反,您应该使用普通用户登录,然后通过sudo提升权限。

标签: linux

wen 发布于  2024-1-26 11:46 

deb文件的安装 Linux

Deb 文件是 Debian Linux 及其派生发行版(如 Ubuntu)中常见的软件包文件格式。要安装一个 deb 文件,可以使用以下几种方法:

使用 dpkg 命令:
dpkg 是 Debian 系统中用于管理软件包的基本工具之一。你可以使用以下命令来安装一个 deb 文件:

sudo dpkg -i 文件名.deb

请将 "文件名.deb" 替换为你要安装的 deb 文件的实际文件名。-i 选项表示安装软件包。

使用 apt 命令:
你也可以使用 apt 命令来安装 deb 文件,这将自动解决依赖关系并确保软件包管理系统处于一致状态。首先,使用以下命令更新软件包列表:

sudo apt update

然后使用以下命令安装 deb 文件:

sudo apt install ./文件名.deb

这里的 "./文件名.deb" 表示当前目录下的 deb 文件。apt 会自动处理安装过程中的依赖关系。

使用 gdebi 工具(适用于 Ubuntu):
在 Ubuntu 上,你还可以使用 gdebi 工具来安装 deb 文件。首先,确保安装了 gdebi:

sudo apt install gdebi

然后使用以下命令安装 deb 文件:

sudo gdebi 文件名.deb

gdebi 会自动处理依赖关系并安装软件包。

无论你选择哪种方法,安装完成后,软件包应该已经成功安装在你的系统中。请注意,你需要使用超级用户权限(通常是使用 sudo)来执行这些操作。另外,安装 deb 文件时,请确保你信任文件的来源,以防止安全问题。

标签: linux

wen 发布于  2023-9-16 17:46 

Linux系统ca根证书 Linux

今天在window11系统下载了一个Linux子系统debian11, 因为需要下载一个vim软件, 自带的apt源下周很慢, 就换了一个阿里云的源.

deb https://mirrors.aliyun.com/debian/ bullseye main non-free contrib
deb-src https://mirrors.aliyun.com/debian/ bullseye main non-free contrib
deb https://mirrors.aliyun.com/debian-security/ bullseye-security main
deb-src https://mirrors.aliyun.com/debian-security/ bullseye-security main
deb https://mirrors.aliyun.com/debian/ bullseye-updates main non-free contrib
deb-src https://mirrors.aliyun.com/debian/ bullseye-updates main non-free contrib
deb https://mirrors.aliyun.com/debian/ bullseye-backports main non-free contrib
deb-src https://mirrors.aliyun.com/debian/ bullseye-backports main non-free contrib

然后就出现了下面问题

root@LAPTOP-7QAJBP6L:~# apt update
Err:1 https://mirrors.aliyun.com/debian bullseye InRelease
  Certificate verification failed: The certificate is NOT trusted. The certificate issuer is unknown.  Could not handshake: Error in the certificate verification. [IP: 182.40.41.196 443]
Err:2 https://mirrors.aliyun.com/debian-security bullseye-security InRelease
  Certificate verification failed: The certificate is NOT trusted. The certificate issuer is unknown.  Could not handshake: Error in the certificate verification. [IP: 182.40.41.196 443]
Err:3 https://mirrors.aliyun.com/debian bullseye-updates InRelease
  Certificate verification failed: The certificate is NOT trusted. The certificate issuer is unknown.  Could not handshake: Error in the certificate verification. [IP: 182.40.41.196 443]
Err:4 https://mirrors.aliyun.com/debian bullseye-backports InRelease
  Certificate verification failed: The certificate is NOT trusted. The certificate issuer is unknown.  Could not handshake: Error in the certificate verification. [IP: 182.40.41.196 443]
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
All packages are up to date.
W: https://mirrors.aliyun.com/debian/dists/bullseye/InRelease: No system certificates available. Try installing ca-certificates.
W: https://mirrors.aliyun.com/debian-security/dists/bullseye-security/InRelease: No system certificates available. Try installing ca-certificates.
W: https://mirrors.aliyun.com/debian/dists/bullseye-updates/InRelease: No system certificates available. Try installing ca-certificates.
W: https://mirrors.aliyun.com/debian/dists/bullseye-backports/InRelease: No system certificates available. Try installing ca-certificates.
W: Failed to fetch https://mirrors.aliyun.com/debian/dists/bullseye/InRelease  Certificate verification failed: The certificate is NOT trusted. The certificate issuer is unknown.  Could not handshake: Error in the certificate verification. [IP: 182.40.41.196 443]
W: Failed to fetch https://mirrors.aliyun.com/debian-security/dists/bullseye-security/InRelease  Certificate verification failed: The certificate is NOT trusted. The certificate issuer is unknown.  Could not handshake: Error in the certificate verification. [IP: 182.40.41.196 443]
W: Failed to fetch https://mirrors.aliyun.com/debian/dists/bullseye-updates/InRelease  Certificate verification failed: The certificate is NOT trusted. The certificate issuer is unknown.  Could not handshake: Error in the certificate verification. [IP: 182.40.41.196 443]
W: Failed to fetch https://mirrors.aliyun.com/debian/dists/bullseye-backports/InRelease  Certificate verification failed: The certificate is NOT trusted. The certificate issuer is unknown.  Could not handshake: Error in the certificate verification. [IP: 182.40.41.196 443]
W: Some index files failed to download. They have been ignored, or old ones used instead.

检查发现是没有安装ca证书, 然后把/etc/apt/sources.list文件还原, 然后运行下面命令

apt install ca-certificates

然后再把源换成阿里云的源.
我在网上看到有的直接把https改为http, 我没试过不知道可不可以用.

标签: linux

wen 发布于  2023-6-16 14:08 

inux 多进程下载工具axel Linux

Axel 是一个开源的多线程下载工具,可用于在 Linux 系统上加快文件下载速度。它可以将一个文件分成多个部分,并使用多个线程同时下载这些部分,从而提高下载速度。

标签: linux

wen 发布于  2023-5-24 17:42 

Linux iftop命令 Linux

iftop是一款用于实时监控网络流量的命令行工具

标签: linux

wen 发布于  2023-5-24 08:55 

linux 查看磁盘 Linux

df 命令:显示磁盘空间使用情况和挂载点。

标签: linux

wen 发布于  2023-5-15 17:42 

linux systemctl 查看服务列表 Linux

要查看 Linux 系统中的服务列表,可以使用 systemctl 命令。systemctl 是用于管理系统服务的工具,提供了许多有用的功能,包括启动、停止、重启、查看状态等。

标签: linux

wen 发布于  2023-5-10 17:32 

debian11 ip修改为静态ip Linux

要将Debian的IP地址更改为静态IP地址,您需要编辑网络配置文件。以下是一些简单的步骤:

打开终端并切换到root用户。

打开网络配置文件/etc/network/interfaces。

标签: linux

wen 发布于  2023-4-7 10:30 

ssh 使用 root 账户无法登录 root登录被禁用 Linux

如果使用root账户通过SSH登录被禁用,您可以使用以下步骤来解决问题:

以具有sudo权限的用户身份登录服务器。如果您不知道具有sudo权限的用户,请联系系统管理员。
root@192.168.119.129's password:
Access denied

标签: linux

wen 发布于  2023-4-7 10:26