debian基础配置
<h1 id="一配置软件源">一、配置软件源</h1><p>编辑<code>/etc/apt/sources.list</code>,添加下面地址(bookworm为debian12的代号,其它debian需要更换代号)</p>
<pre><code class="language-shell">deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm main contrib non-free non-free-firmware
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm main contrib non-free non-free-firmware
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-updates main contrib non-free non-free-firmware
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-updates main contrib non-free non-free-firmware
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-backports main contrib non-free non-free-firmware
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-backports main contrib non-free non-free-firmware
deb https://mirrors.tuna.tsinghua.edu.cn/debian-security bookworm-security main contrib non-free non-free-firmware
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian-security bookworm-security main contrib non-free non-free-firmware
</code></pre>
<p>更新源</p>
<pre><code class="language-shell">sudo apt update
</code></pre>
<h1 id="二配置静态地址">二、配置静态地址</h1>
<p>查看网卡名称<code>ip a</code><br>
编辑网卡配置文件<code>vi /etc/network/interfaces</code></p>
<pre><code class="language-shell">auto ens32
allow-hotplug ens32
iface ens32 inet static
address 192.168.88.150
netmask 255.255.255.0
gateway 192.168.88.2
</code></pre>
<p>重启网卡<code>systemctl restart networking.service</code></p>
<p>配置dns<code>vi /etc/resolv.conf</code></p>
<pre><code class="language-shell">nameserver 114.114.114.114
nameserver 8.8.8.8
nameserver 8.8.8.4
</code></pre><br><br>
来源:https://www.cnblogs.com/tanglx/p/18759355
頁:
[1]