Linux環境安裝(Ubuntu)
Linux環境安裝,這次我們選擇安裝Ubuntu
第一步:
首先我們需要準備虛擬機器,下載一個VMware
其次去網上下載Ubuntu的映象
第二步:
建立虛擬機器,選擇Ubuntu的映象,我們容量選擇40GB,記憶體4G,CPU核心數量2核,2執行緒。
最終下載一段時間後成功載入Ubuntu的介面
第三步:
登入後右鍵桌面開啟終端,首先我們需要切換一下root使用者,因為root使用者才擁有最高許可權,我們才可以安裝我們需要的工具
輸入sudo su,輸入密碼後回車,這裡密碼輸入後會看不到,不知道是BUG還是就是這樣,反正要注意別輸錯了
輸入apt-get install openssh-server安裝遠端工具,我們就可以用(CRT/XSHELL)去遠端連線了
隨後再去網上下載一個SecureCRT
接著我們還需要下載一個net-tools在Ubuntu中輸入:apt-get install net-tools
以上基礎環境全部安裝好後我們就可以啟動CRT對linux系統進行操作了
第四步:
我們需要替換linux系統中的源,將其換成阿里源,方便我們以後下載一些東西
輸入命令: cd /etc/apt
mv sources.list sources.list_bak(將原來的原始檔改個名)
vi sources.list 建立一個新的檔案,輸入i進入編輯模式,隨後複製以下文字:
deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universemultiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
編輯完成後按ESC返回,按住shift+:冒號鍵,隨後輸入wq!確認儲存
我們使用cat sources.list檢視檔案是否儲存成功
完成以上步驟後,我們的初期linux就算搭建好啦