Ubuntu Dailly

OS: Ubuntu-14.10
NoteBook: Thinkpad-T440P

1. 分区

500G硬盘, 12GB内存. 单独安装Ubuntu分区方案

目录卷名文件系统类型大小
根目录/Ext420GB=20480MB
启动目录/bootExt4300MB
系统软件目录/usrExt440GB=40960MB
交换分区swap8GB=8192MB
Hom目录/homeExt4剩余所有
系统引导/boot/efivfat509MB

2. 中文语言支持

System Settings > Language Support > install or remove language > Chinese(simplified)
拖动中文字体到最上方,应用到整个系统
3) 注销或重启

3. Ubuntu Software Center

vim(编辑器), terminator(多终端), PCManFM(文件管理器), Unity Tweak Tool(设置),
GNOME System Monitor(资源管理器), Psensor(温度检测),
Synaptic(新立得), aptitude(终端软件管理),GDebi(软件包安装)

http://linux.cn/thread-10790-1-1.html

sudo apt-get install ubuntu-restricted-extras 
sudo apt-get autoremove unity-lens-music unity-lens-photos unity-lens-gwibber unity-lens-shopping unity-lens-video 
gedit /etc/default/apport 更改值=0 
sudo restart apport 

sudo add-apt-repository ppa:indicator-multiload/stable-daily 
sudo apt-get update 
sudo apt-get install tlp tlp-rdw indicator-multiload 

4. 搜狗拼音输入法

1) http://pinyin.sogou.com/linux/help.php 下载deb安装包
2) sudo dpkg -i sogou_pinyin_linux_1.0.0.0024_amd64.deb
3) 系统设置,语言支持,键盘输入方式:fcitx

5. Linux QQ

http://my.oschina.net/noahxiao/blog/88802

sudo add-apt-repository ppa:lainme/pidgin-lwqq 
sudo apt-get update 
sudo apt-get install pidgin-lwqq 
sudo apt-get remove empathy --purge 
sudo apt-get remove gwibber --purge 
sudo apt-get install pidgin 
搜索pid, 添加,协议选择WebQQ 

6. Chrome 浏览器

1) 修改/etc/hosts: http://levi.cg.am/archives/3553
2) 下载chrome: http://www.google.cn/intl/zh-CN/chrome/?
3) 升级Chrome: sudo apt-get install google-chrome-stable

7. Git 版本控制

sudo apt-get install git 
git config --global user.name "z" 
git config --global user.email "z@gmail.com" 
git config --global credential.helper 'cache --timeout=3600' 

git add .
git commit -m 'test'
git push origin master

8. GoAgent 代理上网

1) 下载: https://github.com/goagent/goagent
2) 修改goagent/local/proxy.ini的appid: tiantiandingding

Ubuntu Chrome Goagent导入证书
http://shajb.net/2012/08/guan-yu-ubuntu-xia-chrome-shi-yong-goagent-zh…
1) sudo apt-get install libnss3-tools
2) certutil -d sql:$HOME/.pki/nssdb -A -t “C,,” -n GoAgent -i ‘/home/hadoop/tool/goagent/local/CA.crt’

9. IDE 开发工具

Eclipse下拉框无菜单项

菜单栏下拉框黑色在执行命令时加上env UBUNTU_MENUPROXY=
比如/usr/share/applications/ideaIU.desktop

[Desktop Entry] 
Version=1.0 
Type=Application 
Terminal=false 
Name=ideaIU 
GenericName=ideaIU 
Comment=ideaIU 
Exec=env UBUNTU_MENUPROXY= /home/hadoop/soft/idea-IU-135.690/bin/idea.sh 
Icon=/home/hadoop/soft/idea-IU-135.690/bin/idea.png 
Categories=IDE;Development

10. Ubuntu日常工作

删除全部文件内容

1. 转到文件结尾 G
2. :1,.d 删除第一行到末尾  “.”当前行 ,“1,.”表示从第一行到当前行 ,“d”删除

无法复制文件到usr bin share

在终端执行命令:sudo gnome-open /usr/ 就可以复制,剪切,删除文件了

无法打开gedit

报错: gedit Gtk-WARNING: can not open display:
解决办法:
sudo -H env DISPLAY=:0 gedit  文件名

VI不能正常工作

比如按下上下箭头, 会出现[A][B]之类的字符
解决:修改/etc/vim/vimrc.tiny 将set compatible改为set nocompatible

命令行模式

sudo gedit /etc/default/grub
将GRUB_CMDLINE_LINUX_DEFAULT 后面加上text
sudo update-grub

remmina无法连接到远程服务器

rm .freerdp/known_hosts

安装deb文件

sudo  dpkg  ­i  package.deb

更新源失败

无法解析或打开软件包的列表或是状态文件
正在读取软件包列表... 有错误!
E: Encountered a section with no Package: header
E: Problem with MergeList
/var/lib/apt/lists/cn.archive.ubuntu.com_ubuntu_dists_natty_main_i18n_Translationen
E: 无法解析或打开软件包的列表或是状态文件。
问题:软件包出错
解决:
sudo rm /var/lib/apt/lists/* -vf
sudo apt-get update

Ubuntu一键安装LAMP

http://wiki.ubuntu.com.cn/Apache

sudo apt-get install apache2 php5-mysql libapache2-mod-php5 mysql-server
安装完毕后: http://localhost 即可.自动启动了Apache服务

修改文件夹权限

chmod -R 777 /usr/local/cloud
sudo rm -rf folder 删除文件夹下的所有文件
ls -a 显示隐藏文件
sudo mv f1 f2 剪切
sudo cp f1 f2  复制

Ubuntu14.04中禁用叠加滚动条

禁用:gsettings set com.canonical.desktop.interface scrollbar-mode normal
启用:gsettings reset com.canonical.desktop.interface scrollbar-mode

Ubuntu网络

vi /etc/network/interfaces
sudo /etc/init.d/networking restart
sudo ifconfig eth0 down

通过脚本启动应用程序

$ vi app

#!/bin/bash
arg=$1
cmd=''
if [ $arg == 'idea' ]; then
  cmd='/home/hadoop/tool/idea-IU-135.1289/bin/idea.sh'
fi
if [ $arg == 'dbvis' ]; then
  cmd='/home/hadoop/tool/DbVisualizer/dbvis'
fi
echo '应用程序启动命令:' $cmd
nohup $cmd &
执行./app idea即可

11. 下载源

ubuntu-14.04国内下载源

# sudo gedit /etc/apt/sources.list
deb http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse

deb http://mirrors.163.com/ubuntu/ trusty main restricted
deb http://mirrors.163.com/ubuntu/ trusty main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ trusty-security main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ trusty-updates main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ trusty-backports main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ trusty main restricted
deb-src http://mirrors.163.com/ubuntu/ trusty main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ trusty-security main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ trusty-updates main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ trusty-backports main restricted universe multiverse

ubuntu-14.10国内下载源

deb http://mirrors.aliyun.com/ubuntu/ utopic main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ utopic-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ utopic-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ utopic-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ utopic-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ utopic main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ utopic-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ utopic-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ utopic-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ utopic-backports main restricted universe multiverse

deb http://mirrors.163.com/ubuntu/ utopic main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ utopic-security main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ utopic-updates main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ utopic-proposed main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ utopic-backports main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ utopic main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ utopic-security main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ utopic-updates main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ utopic-proposed main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ utopic-backports main restricted universe multiverse
    原文作者:zqhxuyuan
    原文地址: https://segmentfault.com/a/1190000002954879
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞