Linux桌面環境一般性配置实践: Ubuntu
准备陆续整理一个安装Linux后系统配置的实践经验整理. 目前以Ubuntu(最新版)为例.
僅適用桌面環境Linux, 不包括服務器上的Linux.
设置系统默认编辑器为vim (需要先安装vim: sudo apt-get install vim)
sagan@ubuntu:~$ sudo update-alternatives --config editor
There are 4 choices for the alternative editor (providing /usr/bin/editor).
Selection Path Priority Status
------------------------------------------------------------
* 0 /bin/nano 40 auto mode
1 /bin/ed -100 manual mode
2 /bin/nano 40 manual mode
3 /usr/bin/vim.basic 30 manual mode
4 /usr/bin/vim.tiny 10 manual mode
Press enter to keep the current choice[*], or type selection number: 3
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/editor (editor) in manual mode
sagan@ubuntu:~$
There are 4 choices for the alternative editor (providing /usr/bin/editor).
Selection Path Priority Status
------------------------------------------------------------
* 0 /bin/nano 40 auto mode
1 /bin/ed -100 manual mode
2 /bin/nano 40 manual mode
3 /usr/bin/vim.basic 30 manual mode
4 /usr/bin/vim.tiny 10 manual mode
Press enter to keep the current choice[*], or type selection number: 3
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/editor (editor) in manual mode
sagan@ubuntu:~$
禁用sudo的要求輸入密碼提示
sudo visudo
and change this line:
%sudo ALL=(ALL:ALL) ALL
for this line:
%sudo ALL=(ALL:ALL) NOPASSWD: ALL
save the changes and close your session to have your system taking the changes.
and change this line:
%sudo ALL=(ALL:ALL) ALL
for this line:
%sudo ALL=(ALL:ALL) NOPASSWD: ALL
save the changes and close your session to have your system taking the changes.
Git配置
使用 git config --global 可以把設置保存在全局(~/.gitconfig)而非當前所在的git repository目錄.
记住连接時輸入的用户名和密码等credential信息.
git config credential.helper store
Samba配置
安装 system-config-samba包 (GNOME)或 kdenetwork-filesharing包 (KDE)
sudo apt-get install system-config-samba
sudo apt-get install kdenetwork-filesharing
错误修复
每次系统启动时弹出对话框 "System program problem detected"
有时升级软件包 / 发行版后出现. 修复: sudo rm /var/crash/*