惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

S
Security Archives - TechRepublic
WordPress大学
WordPress大学
量子位
The GitHub Blog
The GitHub Blog
S
SegmentFault 最新的问题
Vercel News
Vercel News
博客园 - 三生石上(FineUI控件)
云风的 BLOG
云风的 BLOG
有赞技术团队
有赞技术团队
Google DeepMind News
Google DeepMind News
H
Heimdal Security Blog
Microsoft Security Blog
Microsoft Security Blog
人人都是产品经理
人人都是产品经理
Engineering at Meta
Engineering at Meta
The Last Watchdog
The Last Watchdog
Security Latest
Security Latest
C
CXSECURITY Database RSS Feed - CXSecurity.com
PCI Perspectives
PCI Perspectives
H
Help Net Security
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
博客园 - Franky
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
MongoDB | Blog
MongoDB | Blog
V
V2EX - 技术
Attack and Defense Labs
Attack and Defense Labs
C
Cybersecurity and Infrastructure Security Agency CISA
H
Hacker News: Front Page
Stack Overflow Blog
Stack Overflow Blog
C
Check Point Blog
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
V
Visual Studio Blog
T
Tor Project blog
Recent Commits to openclaw:main
Recent Commits to openclaw:main
C
Cisco Blogs
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
大猫的无限游戏
大猫的无限游戏
Simon Willison's Weblog
Simon Willison's Weblog
F
Full Disclosure
博客园 - 司徒正美
L
LINUX DO - 最新话题
J
Java Code Geeks
G
GRAHAM CLULEY
The Register - Security
The Register - Security
B
Blog
D
Darknet – Hacking Tools, Hacker News & Cyber Security
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
A
About on SuperTechFans
N
Netflix TechBlog - Medium
TaoSecurity Blog
TaoSecurity Blog
S
Security Affairs

Shine & Website

从圆肩到挺拔:我的训练计划 V2|肩胛稳定优先 2026 最新土耳其(外区)Apple ID 注册教程:低价订阅 ChatGPT Plus 完整指南(附开启跨区 Apple 家庭共享) 我们都还在路上:在不确定中攒出自己的选择权 Claude Desktop 接入第三方模型 API:基于 ccswitch 的配置与踩坑 从圆肩到挺拔:我的训练计划 V1|我的第一份认真训练计划 一生难忘,仅此一次:傅氏傅厝井朵桥祖厝重建竣工暨祔桃庆典 At Datawahle 我在Datawahle的日常 使用 Waline 实现 iCloud 和 Gmail 邮件通知的完整配置教程 为 Astro 博客打造完美的 Waline 评论系统:从集成到深度定制的完整实践 vscode优化体验(推荐设置 & 推荐插件) YOLO V7及多线程优化和边缘端设备RK3588-RK3588S部署 YOLO V11及多线程优化和边缘端设备RK3588-RK3588S部署 用于备份和恢复 Zotero 配置的插件-蒲公英 Tara Obsidian利用Syncthing全平台同步终极方案 同步ios和PC端 04讲 - 炼丹流程 - PyTorch深度学习快速入门教程 03讲 - 神经网络 - PyTorch深度学习快速入门教程 02讲 - 数据 - PyTorch深度学习快速入门教程 01讲 - 配置 - PyTorch深度学习快速入门教程 其他设备通过局域网内主机的代理VPN科学上网(以Jetson设备为例) Jetson系统烧入过程(以Orin - Nano为例) Jetson Orin Nano开发指南记录 以RKNN系列模型为例,训练一个yolov7的目标检测模型 常用软件配置分享 - 持续更新 瓦肯举手礼 初识MCP技术 Qwen2.5 - VL的vllm部署方案(图像分析) 部署大模型并用Chatbox连接到远程Ollama服务 关于biome代码审查 配合Cloudflare和Piclist搭建一个属于你的免费图床 代码如诗,文章如歌
新机Linux(Ubuntu)到手一般都会做如下配置
2025-07-17 · via Shine & Website

新Linux (Ubuntu) 系统初始化配置步骤: 1. 更改主机名。 2. 更换国内系统源。 3. 更新系统常用软件包。 4. 启用 BBR 网络优化。 5. 启用虚拟内存。 6. 使用国内镜像安装 Docker。 7. 加强 SSH 防护(修改端口、禁止空密码)。 8. 安装 Web 服务 (Caddy)。 9. 更改系统语言为中文。 10. 配置系统时区为上海。 此外,提供了一些参考链接,包括 GitHub 加速下载、Docker 镜像加速服务和代理设置。 最后,还提到了其他优化建议,如 apt 镜像源配置、SSH 优化、fail2ban 防护等。

July 17, 2025  •  1 min read


我新机到手一般都会做如下配置

按顺序执行

1:更改主机名

hostnamectl set-hostname localhost

2:换国内系统源(开源脚本)

bash <(curl -sSL https://gitee.com/SuperManito/LinuxMirrors/raw/main/ChangeMirrors.sh)

3:更新系统常用包

apt update && apt install -y curl wget git zip tar lsof vim sudo

4:启用 BBR

sudo modprobe tcp_bbr && echo "net.ipv4.tcp_congestion_control = bbr" | sudo tee -a /etc/sysctl.conf && sudo sysctl -p

5:启用虚拟内存

sudo fallocate -l 2G /swapfile && sudo chmod 700 /swapfile && sudo mkswap /swapfile && sudo swapon /swapfile && echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab

6:使用国内镜像安装 docker(开源脚本)

bash <(curl -sSL https://gitee.com/SuperManito/LinuxMirrors/raw/main/DockerInstallation.sh)

7:加强 SSH 防护

修改 SSH 配置文件

sudo vim /etc/ssh/sshd_config

找到对应的配置然后修改

# 修改SSH服务端口

Port 2222

# 禁止使用空密码登录

PermitEmptyPasswords no

重启 SSH 服务

sudo systemctl restart ssh

8:安装 web 服务(caddy)

sudo apt install -yq debian-keyring debian-archive-keyring apt-transport-https curl && curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | sudo gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg && curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | sudo tee /etc/apt/sources.list.d/caddy-stable.list && sudo apt update -q && sudo apt install -yq caddy

9:更改系统语言为中文

sudo nano /etc/locale.gen

# zh_CN.UTF-8 UTF-8 // 取消这行注释

sudo locale-gen

sudo update-locale LANG=zh_CN.UTF-8

sudo localectl set-locale LANG=zh_CN.UTF-8

10:配置系统时区为上海

sudo ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime

11:然后就可以使用 docker 愉快的部署各种服务了(脚本已自动配置国内镜像源),然后配合 caddy 反代各种服务

其他参考

# 鱼香 ros 一键安装

wget http://fishros.com/install -O fishros && . fishros

GitHub · Build and ship software on a single, collaborative platform · GitHub

KGitHub Help

方达极客社区

Title Unavailable | Site Unreachable

Title Unavailable | Site Unreachable

GitHub 加速下载 - 在线工具

GitHub - 233boy/v2ray: 最好用的 V2Ray 一键安装脚本 & 管理脚本

Docker镜像加速服务整理

docker 国内代理看这个帖子:https://linux.do/t/topic/789917 科学上完用 clash verge + 机场订阅链接 系统 apt 源换国内的(Google 搜一些帖子非常多)

命令行走代理修改~/.bashrc 文件, 12334 端口修改为实际的代理端口。 注意对于 ping 这类 icmp 协议工具,是没办法走代理的。

  • HTTP / HTTPS 代理 export HTTP_PROXY=“http://127.0.0.1:12334” export HTTPS_PROXY=“http://127.0.0.1:12334
  • 如果你需要走 SOCKS5(某些工具优先用 ALL_PROXY) export ALL_PROXY=“socks5:<//127.0.0.1<12334>>” 修改后 source ~/.bashrc 保存生效

配置 apt 镜像源; BBR 优化; 优化 SSH 配置(改端口、配置密钥对、心跳维持连接等); 配置 fail2ban、UFW 等; 配置 .zshrc、.vimrc 等,添加常用的几个 alias; 配置 proxychains; 安装 neofetch、cowsay 等强大的 CLI 工具; 每天来一把 sudo apt upgrade -y。

实验室备份

apt

cd /etc/apt

cp /etc/apt/sources.list /etc/apt/sources.list.bak

gedit sources.list

deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic main multiverse restricted universe

deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic-security main multiverse restricted universe

deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic-updates main multiverse restricted universe

deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic-backports main multiverse restricted universe

deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic main multiverse restricted universe

deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic-security main multiverse restricted universe

deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic-updates main multiverse restricted universe

deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic-backports main multiverse restricted universe

sudo apt-get update

pip

pip3 install --upgrade pip

mkdir ~/.pip

gedit ~/.pip/pip.conf

[global]

index-url = https://pypi.mirrors.ustc.edu.cn/simple

[install]

trusted-host = https://pypi.mirrors.ustc.edu.cn

torch

sudo apt-get install python3-pip libopenblas-base libopenmpi-dev libomp-dev

pip3 install Cython

pip3 install numpy torch-1.8.0-cp36-cp36m-linux_aarch64.whl

import torch

import torchvision

print(torch.__version__)

print(torchvision.__version__)

torchvison

sudo apt-get install libjpeg-dev zlib1g-dev libpython3-dev libavcodec-dev libavformat-dev libswscale-dev

cd torchvision

$ export BUILD_VERSION=0.x.0 # where 0.x.0 is the torchvision version

$ python3 setup.py install --user

$ cd ../ # attempting to load torchvision from build dir will result in import error

$ pip install 'pillow<7' # always needed for Python 2.7, not needed torchvision v0.5.0+ with Python 3.6

新机Linux(Ubuntu)到手一般都会做如下配置

https://www.futseyi.com/blog/ubuntu-new-machine-setup/

Author
FuTseYi

Published at
July 17, 2025

Copyright
CC BY-NC-SA 4.0