獲取系統安裝包的編譯原始碼及指令碼
apt-get source package
查詢埠被占用的程序
lsof -i:埠號
配置阿里源
# mv /etc/apt/source.list /etc/apt/source.list.bak
# vim /etc/apt/sources.list
deb-src xenial main restricted
deb xenial main restricted
deb-src xenial main restricted multiverse universe
deb xenial-updates main restricted
deb-src xenial-updates main restricted multiverse universe
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
deb xenial partner
deb-src xenial partner
deb xenial-security main restricted
deb-src xenial-security main restricted multiverse universe
deb xenial-security universe
deb xenial-security multiverse
ssh允許root登入
### 編輯配置檔案,修改'permitrootlogin without-password'為'permitrootlogin yes'
# vim /etc/ssh/sshd_config
### 重啟ssh服務
# service ssh restart
切換成gnome介面
# apt-get install gnome-shell
# apt-get install gnome-panel
# apt-get install gnome-terminal
# apt-get install plymouth-label
# apt-get install open-vm-tools
切換視窗管理器
# dpkg-reconfigure gdm
apt源更新報錯
e: failed to fetch cdrom://ubuntu-server 16.04 lts _xenial xerus_ - release amd64
### 刪除apt配置檔案對應源 deb cdrom:xx
# vim /etc/apt/sources.list
啟動vnc服務
### ubuntu 14.04 tls
# vnc4server -geometry 1600x1080 :2
# vnc4server -kill :2
時間同步
### 修改時區
# cp /usr/share/zoneinfo/asia/shanghai /etc/localtime
### 安裝ntp並同步時間
# apt install chrony
# chronyc sources
ubuntu server新增中文支援
### 安裝language support
# apt install language-pack-zh-hans
# apt install language-selector-gnome
### language support的鍵盤輸入模式系統選擇ibus
### region & language的input sources新增chinese(sunpinyin)
### 最後必須關機
# halt
軟體自動更新設定
### 編輯自動更新配置檔案,去掉需要自動更新的軟體注釋
# vim /etc/apt/apt.conf.d/50unattended-upgrades
unattended-upgrade::allowed-origins :$";
"$:$-security";
// "$:$-updates";
// "$:$-proposed";
// "$:$-backports";
};### 開啟軟體自動更新
# vim /etc/apt/apt.conf.d/10periodic
apt::periodic::update-package-lists "1"; //顯示更新包列表,0表示停用設定
apt::periodic::autocleaninterval "0"; //n日後自動清理軟體包
apt::periodic::unattended-upgrade "1"; //啟用自動更新,0表示停用自動更新
安裝rabbitmq-server
### 安裝rabbitmq
# apt-get install rabbitmq-server
# systemctl start rabbitmq-server
# systemctl enable rabbitmq-server
### 開啟web訪問
# vim /etc/rabbitmq/rabbitmq.config
}].# rabbitmq-plugins enable rabbitmq_management
# systemctl restart rabbitmq-server
Ubuntu使用技巧
ctrl c pwd 開啟終端後使用 ctrl shift t 關閉終端用ctrl shift w 1 reboot 2 shutdown r now 立刻重啟 root使用者使用 3 shutdown r 10 過10分鐘自動重啟 root使用者使用 4 shutdown r 20 35 在時間為...
Ubuntu 使用技巧
1.修改ubuntu 的螢幕亮度 在fn無法調節的情況下 root許可權修改 etc rc.local檔案,在exit 0 之前新增如下 echo 1500000 sys class backlight intel backlight brightness echo 1500000 sys clas...
ubuntu使用技巧
ubuntu有以下方式切換到root身份。sudo 命令,輸入當前使用者密碼後以root許可權執行命令,有時間限制且僅限當前命令。sudo i,輸入當前使用者密碼後以root許可權登入shell,無時間限制。使用exit或logout退出。su,輸入root賬戶的密碼後切換到root身份,無時間限制...