ubuntu系统基础配置


一、网络配置

安装完系统后,会出现这样的界面:
在这里插入图片描述
输入之前设定的密码即可。
在这里插入图片描述
登录成功。

切换root登录。
在这里插入图片描述

sudo -i
输入你的密码即可登录root
修改sshd_config
使其可以使用root直接登录
vim /etc/ssh/sshd_config
PermitRootLogin yes
systemctl restart sshd

:wq
修改root密码
在这里插入图片描述

修改时区

timedatectl set-timezone Asia/Shanghai
timedatectl -a
timedatectl show

在这里插入图片描述
修改域名

hostnamectl hostname 域名
bash

修改网络配置

vim /etc/netplan/*
network:
  version: 2
  renderer: networkd
  ethernets:
    ens33:
      dhcp4: no
      dhcp6: no
      addresses: [172.16.1.30/16]
      routes:
        - to: default
          via: 172.16.16.1
      nameservers:
        addresses: [218.2.135.1, 8.8.8.8]

netplan apply重启网络

二、修改镜像源

vim /etc/apt/sources.list
deb https://mirrors.aliyun.com/ubuntu/ jammy main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ jammy main restricted universe multiverse

deb https://mirrors.aliyun.com/ubuntu/ jammy-security main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ jammy-security main restricted universe multiverse

deb https://mirrors.aliyun.com/ubuntu/ jammy-updates main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ jammy-updates main restricted universe multiverse

# deb https://mirrors.aliyun.com/ubuntu/ jammy-proposed main restricted universe multiverse
# deb-src https://mirrors.aliyun.com/ubuntu/ jammy-proposed main restricted universe multiverse

deb https://mirrors.aliyun.com/ubuntu/ jammy-backports main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ jammy-backports main restricted universe multiverse

修改成ali源。

阿里云仓库地址:https://opsx.alibaba.com/mirror    https://developer.aliyun.com/mirror/
中科:http://mirrors.ustc.edu.cn/help/ubuntu.html
清华:https://mirror.tuna.tsinghua.edu.cn/help/ubuntu/
华为:https://mirrors.huaweicloud.com/

但一定记得要apt update。

基础安装命令:

yum -- apt / apt-get
rpm -- dpkg 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值