ubuntu基本配置

记录一下每次重新安装系统之后都要进程的操作

更新源

更新源的教程

bash 复制代码
sudo bash -c "cat << EOF > /etc/apt/sources.list && apt update 
deb http://mirrors.aliyun.com/ubuntu/ jammy main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ jammy main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ jammy-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ jammy-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ jammy-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ jammy-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ jammy-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ jammy-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ jammy-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ jammy-backports main restricted universe multiverse
EOF"

安装软件

  • gcc
  • g++
  • gdb
  • git
  • vim

安装

spacevim

美化

  1. zsh

    bash 复制代码
    sudo apt install git zsh -y 
  2. oh-my-zsh,主题默认为'ys'

    bash 复制代码
    sh -c "$(curl -fsSL https://gitee.com/pocmon/ohmyzsh/raw/master/tools/install.sh)"
  3. 切换默认 shell

    bash 复制代码
    chsh -s $(which zsh)

    注销之后登录

  4. spaceVim

    修改tab为4

    默认的代码缩进值是 2,缩进的大小由选项 default_indent 设置, 如果希望使用 4 个空格作为缩进,只需要在 SpaceVim 配置文件中加入如下内容:

    bash 复制代码
    [options]
        default_indent = 4

    default_indent 这一选项的值,将被赋值到 Vim 的选项:&tabstop&softtabstop&shiftwidth。默认情况下,输入的 <Tab> 会被自动展开成对应缩进数量的空格, 可通过设置选项 expand_tab 的值为 false 来禁用这一特性:

    bash 复制代码
    [options]
        default_indent = 4
        expand_tab = true

vscode ssh

使用体验更好

gcc、g++保证了头文件

gdb 支持了运行和调试

相关推荐
人工智能训练15 分钟前
Ubuntu中如何进入root用户
linux·运维·服务器·人工智能·ubuntu·ai编程·root
tianshiyeben17 分钟前
WGCLOUD监控系统使用指南 - 告警消息整理完整版
linux·运维·服务器·系统安全·zabbix
Unlyrical20 分钟前
splice, io_uring_prep_splice 调用(无效参数)
linux·服务器·c++·unix
喜欢你,还有大家39 分钟前
Docker-存储
运维·docker·容器
暂时先用这个名字1 小时前
信创时代下,PHP/MySQL应用的平滑迁移与运维管理升级(AI整理)
运维·mysql·php·信创·国产化·国产·迁移
---学无止境---1 小时前
Linux内核用户身份管理全链路深度剖析:setuid系统调用完整架构
linux
CS_浮鱼1 小时前
【Linux】进程控制
linux·运维·网络
Miraitowa_cheems2 小时前
LeetCode算法日记 - Day 104: 通配符匹配
linux·数据结构·算法·leetcode·深度优先·动态规划
fengyehongWorld2 小时前
Linux stat命令
linux
人工智能训练2 小时前
Docker中容器的备份方法和步骤
linux·运维·人工智能·ubuntu·docker·容器·nvidia