Linux系統初始化更新(更換阿里源)

2021-09-22 21:08:33 字數 1765 閱讀 6875

1. centos6、7

修改linux配置

更換yum 更新源

mv /etc/yum.repos.d/centos-base.repo /etc/yum.repos.d/centos-base.repo.backup

wget -o /etc/yum.repos.d/centos-base.repo6.repo

yum clean all

yum makecache

更新系統

yum -y update

sudo yum list kernel -y

sudo yum update -y kernel

更新完成後,重啟系統。(讓新的核心版本生效)

重啟後,檢視核心版本:

2. ubuntu16

源目錄位置:/etc/apt/sources.list

sudo apt-get update

sudo apt-get dist-upgrade

更換源

1.備份系統自帶源

mv /etc/apt/sources.list /etc/apt/sources.list.bak

2.修改/etc/apt/sources.list檔案

vim /etc/apt/sources.list

加入如下內容

deb-src xenial main restricted #added by software-properties

deb xenial main restricted

deb-src xenial main restricted multiverse universe #added by software-properties

deb xenial-updates main restricted

deb-src xenial-updates main restricted multiverse universe #added by software-properties

deb xenial universe

deb xenial-updates universe

deb xenial multiverse

deb xenial-updates multiverse

deb xenial-backports main restricted universe multiverse

deb-src xenial-backports main restricted universe multiverse #added by software-properties

deb xenial partner

deb-src xenial partner

deb xenial-security main restricted

deb-src xenial-security main restricted multiverse universe #added by software-properties

deb xenial-security universe

deb xenial-security multiverse

3.更新生效

apt-get update

理解linux系統初始化

文章內容由網上蒐集的資料整理而得,由於資料下的太多沒注意出處及作者,在這裡只好謝謝各位大大們了。要說linux服務就不得不說linux系統的初始化過程了。開機步驟 1.開機自檢 2.預引導 3.核心映像裝入 4.核心啟動 5.系統初始化 6.等待使用者登入 注 在核心啟動完之後會搜尋檔案系統中的in...

linux初始化系統init

linux從bios開始啟動,然後載入記憶體映像到記憶體,進行記憶體初始化,核心初始化的最後一步是啟動乙個pid為1的init的程序!他負責載入啟動別的程序。對應的啟動指令碼都在 etc init.d下。init是序列化啟動,啟動較慢!init的管理 etc init.d deamon start,...

LINUX 系統初始化指令碼

bin bash the system first start configuretion for install copy right by donglei 1 配置sysctl mv etc sysctl.conf etc sysctl.bak echo the new config for s...