差别
这里会显示出您选择的修订版和当前版本之间的差别。
两侧同时换到之前的修订记录前一修订版后一修订版 | 前一修订版 | ||
it:server:ubuntu [2023-04-04 18:50] – [进程] goldentianya | it:server:ubuntu [2024-07-18 09:41] (当前版本) – [查看端口] goldentianya | ||
---|---|---|---|
行 55: | 行 55: | ||
查看1194端口当前被什么服务侦听:< | 查看1194端口当前被什么服务侦听:< | ||
查看openvpn当前侦听哪个端口:< | 查看openvpn当前侦听哪个端口:< | ||
+ | |||
+ | ==== 查看内存 ==== | ||
+ | |||
+ | 列举占用内存最多的10个应用 | ||
+ | ps aux --sort=-%mem | head -n 10 | ||
==== TimeShift 系统备份 ==== | ==== TimeShift 系统备份 ==== | ||
使用 TimeShift 备份到usb 闪存。(([[https:// | 使用 TimeShift 备份到usb 闪存。(([[https:// | ||
行 65: | 行 70: | ||
sudo apt install timeshift | sudo apt install timeshift | ||
</ | </ | ||
+ | |||
+ | 查看8888端口是否被占用 | ||
+ | lsof -i:8888 | ||
==== RSYNC 备份服务 ==== | ==== RSYNC 备份服务 ==== | ||
行 161: | 行 169: | ||
特别适用于远程登录主机,执行很长时间的大任务。它将任务放在一个独立的环境中执行,就算失去连接。重新登录后也能不丢失原先的工作进程。(([[https:// | 特别适用于远程登录主机,执行很长时间的大任务。它将任务放在一个独立的环境中执行,就算失去连接。重新登录后也能不丢失原先的工作进程。(([[https:// | ||
+ | < | ||
+ | $> screen | ||
+ | $> [run some shell command or .sh file or nodejs ] | ||
+ | $> Strg+A+D // 退出窗口,甚至可以退出 Terminal | ||
+ | // 重新登录后恢复 screen | ||
+ | $> screen -r | ||
+ | $> screen -list | ||
+ | screen -S 364249.pts-0.serverfin -X quit | ||
+ | </ | ||
+ | |||
+ | * 列举存在的窗口:screen -list 或者 screen -ls | ||
+ | * 退出窗口:< | ||
+ | * 进入窗口 | ||
+ | * 创建窗口 <color # | ||
+ | * 进入一个唯一的窗口 <color # | ||
+ | * 进入多个窗口中的一个 <color # | ||
+ | * 关闭窗口process | ||
+ | * 先进入它,然后按 <color # | ||
+ | * 直接代码关闭 <color # | ||
===== crontab 定时任务 ===== | ===== crontab 定时任务 ===== | ||
参考文章:[[https:// | 参考文章:[[https:// | ||
+ | |||
+ | ===== 创建swap ===== | ||
+ | [[https:// | ||
===== 远程桌面 ===== | ===== 远程桌面 ===== | ||
行 169: | 行 199: | ||
安装文章中的第三种方式XRDP就好,可以直接使用微软的远程桌面。在Mac上要安装[[https:// | 安装文章中的第三种方式XRDP就好,可以直接使用微软的远程桌面。在Mac上要安装[[https:// | ||
+ | |||
+ | apt install ubuntu-desktop | ||
+ | apt install xrdp | ||
+ | | ||
+ | 修改conf文件并重启 | ||
+ | sudo vim / | ||
+ | port=tcp://: | ||
+ | systemctl restart xrdp | ||
+ | |||
+ | 防火墙放行 3389 端口 | ||
+ | | ||
+ | |||
====== 用户 ====== | ====== 用户 ====== | ||
行 185: | 行 227: | ||
top 命令查询 <color # | top 命令查询 <color # | ||
- | 后台进程 screen | + | |
- | < | + | |
- | | + | |
- | [run some shell command or .sh file or nodejs ] | + | |
- | | + | |
- | // 重新登录后恢复 screen | + | |
- | | + | |
- | </ | + | |
====== BBR 加速 ====== | ====== BBR 加速 ====== | ||
行 228: | 行 263: | ||
</ | </ | ||
+ | 更改用户git的bash shell:< | ||
+ | |||
+ | 开启git用户的sudo权限:< | ||
====== 自动更新域名解析 ====== | ====== 自动更新域名解析 ====== | ||
- | cloudflare ddns update | + | <color # |
[[https:// | [[https:// | ||
+ | |||
+ | [[https:// | ||
填写四个项 | 填写四个项 |