Debian 10(Buster)安裝后要做的前8件事
Debian 10 的代號(hào)是 Buster,它是來(lái)自 Debian 家族的最新 LTS 發(fā)布版本,并包含大量的特色功能。因此,如果你已經(jīng)在你的電腦上安裝了 Debian 10,并在思考接下來(lái)該做什么,那么,請(qǐng)繼續(xù)閱讀這篇文章直到結(jié)尾,因?yàn)槲覀優(yōu)槟闾峁┰诎惭b Debian 10 后要做的前 8 件事。對(duì)于還沒(méi)有安裝 Debian 10 的人們,請(qǐng)閱讀這篇指南 圖解 Debian 10 (Buster) 安裝步驟。 讓我們繼續(xù)這篇文章。
1) 安裝和配置 sudo
在設(shè)置完成 Debian 10 后,你需要做的第一件事是安裝 sudo 軟件包,因?yàn)樗軌蚴鼓惬@得管理員權(quán)限來(lái)安裝你需要的軟件包。為安裝和配置 sudo,請(qǐng)使用下面的命令:
變成 root 用戶,然后使用下面的命令安裝 sudo 軟件包,
root@linuxtechi:~$ su -
Password:
root@linuxtechi:~# apt install sudo -y
添加你的本地用戶到 sudo 組,使用下面的 usermod 命令,
root@linuxtechi:~# usermod -aG sudo pkumar
root@linuxtechi:~#
現(xiàn)在驗(yàn)證是否本地用戶獲得 sudo 權(quán)限:
root@linuxtechi:~$ id
uid=1000(pkumar) gid=1000(pkumar) groups=1000(pkumar),27(sudo)
root@linuxtechi:~$ sudo vi /etc/hosts
[sudo] password for pkumar:
root@linuxtechi:~$
2) 校正日期和時(shí)間
在你成功配置 sudo 軟件包后,接下來(lái),你需要根據(jù)你的位置來(lái)校正日期和時(shí)間。為了校正日期和時(shí)間,
轉(zhuǎn)到系統(tǒng) 設(shè)置 –> 詳細(xì)說(shuō)明 –> 日期和時(shí)間 ,然后更改為適合你的位置的時(shí)區(qū)。
一旦時(shí)區(qū)被更改,你可以看到時(shí)鐘中的時(shí)間自動(dòng)更改。
3) 應(yīng)用所有更新
在 Debian 10 安裝后,建議安裝所有 Debian 10 軟件包存儲(chǔ)庫(kù)中可用的更新,執(zhí)行下面的 apt
命令:
root@linuxtechi:~$ sudo apt update
root@linuxtechi:~$ sudo apt upgrade -y
注意: 如果你是 vi 編輯器的忠實(shí)粉絲,那么使用下面的 apt
命令安裝 vim
:
root@linuxtechi:~$ sudo apt install vim -y
4) 安裝 Flash 播放器插件
默認(rèn)情況下,Debian 10(Buster)存儲(chǔ)庫(kù)不包含 Flash 插件,因此,用戶需要遵循下面的介紹來(lái)在他們的系統(tǒng)中查找和安裝 flash 播放器。
為 Flash 播放器配置存儲(chǔ)庫(kù):
root@linuxtechi:~$ echo "deb http://ftp.de.debian.org/debian buster main contrib" | sudo tee -a /etc/apt/sources.list
deb http://ftp.de.debian.org/debian buster main contrib
root@linuxtechi:~
現(xiàn)在使用下面的命令更新軟件包索引:
root@linuxtechi:~$ sudo apt update
使用下面的 apt
命令安裝 Flash 插件:
root@linuxtechi:~$ sudo apt install pepperflashplugin-nonfree -y
一旦軟件包被成功安裝,接下來(lái),嘗試播放 YouTube 中的視頻:
5) 安裝軟件,如 VLC、Skype、FileZilla 和截圖工具
如此,現(xiàn)在我們已經(jīng)啟用 Flash 播放器,是時(shí)候在我們的 Debian 10 系統(tǒng)中安裝所有其它的軟件,如 VLC、Skype,F(xiàn)ilezilla 和截圖工具(flameshot)。
安裝 VLC 多媒體播放器
為在你的系統(tǒng)中安裝 VLC 播放器,使用下面的 apt
命令:
root@linuxtechi:~$ sudo apt install vlc -y
在成功安裝 VLC 播放器后,嘗試播放你喜歡的視頻。
安裝 Skype
首先,下載最新的 Skype 軟件包:
root@linuxtechi:~$ wget https://go.skype.com/skypeforlinux-64.deb
接下來(lái),使用 apt
命令安裝軟件包:
root@linuxtechi:~$ sudo apt install ./skypeforlinux-64.deb
在成功安裝 Skype 后,嘗試訪問(wèn)它,并輸入你的用戶名和密碼。
安裝 Filezilla
為在你的系統(tǒng)中安裝 Filezilla,使用下面的 apt
命令,
root@linuxtechi:~$ sudo apt install filezilla -y
一旦 FileZilla 軟件包被成功安裝,嘗試訪問(wèn)它。
安裝截圖工具(flameshot)
使用下面的命令來(lái)安裝截圖工具:flameshot,
root@linuxtechi:~$ sudo apt install flameshot -y
注意: Shutter 工具在 Debian 10 中已被移除。
6) 啟用和啟動(dòng)防火墻
總是建議啟動(dòng)防火墻來(lái)使你的網(wǎng)絡(luò)安全。如果你希望在 Debian 10 中啟用防火墻, UFW(簡(jiǎn)單的防火墻)是最好的控制防火墻的工具。UFW 在 Debian 存儲(chǔ)庫(kù)中可用,它非常容易安裝,如下:
root@linuxtechi:~$ sudo apt install ufw
在你安裝 UFW 后,接下來(lái)的步驟是設(shè)置防火墻。因此,設(shè)置防火墻,通過(guò)拒絕端口來(lái)禁用所有的傳入流量,并且只允許需要的端口傳出,像 ssh、http 和 https。
root@linuxtechi:~$ sudo ufw default deny incoming
Default incoming policy changed to 'deny'
(be sure to update your rules accordingly)
root@linuxtechi:~$ sudo ufw default allow outgoing
Default outgoing policy changed to 'allow'
(be sure to update your rules accordingly)
root@linuxtechi:~$
允許 SSH 端口:
root@linuxtechi:~$ sudo ufw allow ssh
Rules updated
Rules updated (v6)
root@linuxtechi:~$
假使你在系統(tǒng)中已經(jīng)安裝 Web 服務(wù)器,那么使用下面的 ufw
命令來(lái)在防火墻中允許它們的端口:
root@linuxtechi:~$ sudo ufw allow 80
Rules updated
Rules updated (v6)
root@linuxtechi:~$ sudo ufw allow 443
Rules updated
Rules updated (v6)
root@linuxtechi:~$
最后,你可以使用下面的命令啟用 UFW:
root@linuxtechi:~$ sudo ufw enable
Command may disrupt existing ssh connections. Proceed with operation (y|n)? y
Firewall is active and enabled on system startup
root@linuxtechi:~$
假使你想檢查你的防火墻的狀態(tài),你可以使用下面的命令檢查它:
root@linuxtechi:~$ sudo ufw status
7) 安裝虛擬化軟件(VirtualBox)
安裝 Virtualbox 的第一步是將 Oracle VirtualBox 存儲(chǔ)庫(kù)的公鑰導(dǎo)入到你的 Debian 10 系統(tǒng):
root@linuxtechi:~$ wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add -
OK
root@linuxtechi:~$ wget -q https://www.virtualbox.org/download/oracle_vbox.asc -O- | sudo apt-key add -
OK
root@linuxtechi:~$
如果導(dǎo)入成功,你將看到一個(gè) “OK” 顯示信息。
接下來(lái),你需要添加存儲(chǔ)庫(kù)到倉(cāng)庫(kù)列表:
root@linuxtechi:~$ sudo add-apt-repository "deb http://download.virtualbox.org/virtualbox/debian buster contrib"
root@linuxtechi:~$
最后,是時(shí)候在你的系統(tǒng)中安裝 VirtualBox 6.0:
root@linuxtechi:~$ sudo apt update
root@linuxtechi:~$ sudo apt install virtualbox-6.0 -y
一旦 VirtualBox 軟件包被成功安裝,嘗試訪問(wèn)它,并開(kāi)始創(chuàng)建虛擬機(jī)。
8) 安裝最新的 AMD 驅(qū)動(dòng)程序
最后,你也可以安裝需要的附加 AMD 顯卡驅(qū)動(dòng)程序(如 ATI 專有驅(qū)動(dòng))和 Nvidia 圖形驅(qū)動(dòng)程序。為安裝最新的 AMD 驅(qū)動(dòng)程序,首先,我們需要修改 /etc/apt/sources.list
文件,在包含 main 和 contrib 的行中添加 non-free 單詞,示例如下顯示:
root@linuxtechi:~$ sudo vi /etc/apt/sources.list
...
deb http://deb.debian.org/debian/ buster main non-free contrib
deb-src http://deb.debian.org/debian/ buster main non-free contrib
deb http://security.debian.org/debian-security buster/updates main contrib non-free
deb-src http://security.debian.org/debian-security buster/updates main contrib non-free
deb http://ftp.us.debian.org/debian/ buster-updates main contrib non-free
...
現(xiàn)在,使用下面的 apt
命令來(lái)在 Debian 10 系統(tǒng)中安裝最新的 AMD 驅(qū)動(dòng)程序。
root@linuxtechi:~$ sudo apt update
root@linuxtechi:~$ sudo apt install firmware-linux firmware-linux-nonfree libdrm-amdgpu1 xserver-xorg-video-amdgpu -y
這就是這篇文章的全部?jī)?nèi)容,我希望你了解在安裝 Debian 10 后應(yīng)該做什么。