ubuntu的一些常用命令及疑难杂症

记录ubuntu下各种注意事项及常用命令

 

1,发热:因为硬件厂商对linux类系统的支持不足,驱动不会自动安装,所以要自己装。。。

http://www.linuxidc.com/Linux/2015-04/116450.htm

 

2,装上chrome后删掉firefox,su后用synaptic装 ,装软件和删软件都科研

习惯装上adblock,fireshot,getthemall三个插件

http://jingyan.baidu.com/article/335530da98061b19cb41c31d.html

 

3,github上找个lantern

 

3,双系统切换问题:我是装的win7 + ubuntu16.04 双系统,然而可能发生ubuntu把win7的mbr干掉了

的情况,回不了win7,所以必须处理这个问题

https://forum.ubuntu.org.cn/viewtopic.php?f=139&t=442830

你可以进入ubuntu

那么太好了,你只需要增加一段自动搜索的代码就可以了

代码:
sudo gedit /etc/grub.d/40_custom

在文档最下面增加:

代码:
menuentry '搜索并启动windows7'  {
   recordfail
   gfxmode $linux_gfx_mode
   insmod gzio
   insmod part_msdos
   insmod ntfs
   search --no-floppy --file --set=root /bootmgr
     ntldr /bootmgr
}

如果你已经知道bootmgr在第一分区(隐藏分区)
也可以这样写
代码:
menuentry '启动windows7'  {
   recordfail
   gfxmode $linux_gfx_mode
   insmod gzio
   insmod part_msdos
   insmod ntfs
   set root=(hd0,msdos1)
      ntldr /bootmgr
}

最后
代码:
sudo update-grub


重启选择新菜单进入

回到win7后可用easybcd修复一下

 

4,

软件安装命令:sudo apt-get install softname

然而很多时候“源”不对,就会说定位不到这个软件,查找不到这个软件之类的,解决方式就是换“源”,“源”这个东西就是软件中心的地址,网络上有各种各样的可提供软件下载的网络中心,

源的地址可以通过:gedit /etc/apt/sources.list 来修改

提示没有权限修改,就su到root下修改

 

#163

deb http://cn.archive.ubuntu.com/ubuntu/ xenial main restricted universe multiverse
deb http://cn.archive.ubuntu.com/ubuntu/ xenial-security main restricted universe multiverse
deb http://cn.archive.ubuntu.com/ubuntu/ xenial-updates main restricted universe multiverse
deb http://cn.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse
##测试版源
deb http://cn.archive.ubuntu.com/ubuntu/ xenial-proposed main restricted universe multiverse
# 源码
deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial main restricted universe multiverse
deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial-security main restricted universe multiverse
deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial-updates main restricted universe multiverse
deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse
##测试版源
deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial-proposed main restricted universe multiverse


#
deb http://ppa.launchpad.net/v-launchpad-jochen-sprickerhof-de/pcl/ubuntu trusty main
deb-src http://ppa.launchpad.net/v-launchpad-jochen-sprickerhof-de/pcl/ubuntu trusty main

# 
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial main restricted
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates main restricted
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial universe
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates universe
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial multiverse
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates multiverse
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security main restricted
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security universe
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security multiverse

# 
deb-src http://archive.ubuntu.com/ubuntu xenial main restricted #Added by software-properties
deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted
deb-src http://mirrors.aliyun.com/ubuntu/ xenial main restricted multiverse universe #Added by software-properties
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted multiverse universe #Added by software-properties
deb http://mirrors.aliyun.com/ubuntu/ xenial universe
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates universe
deb http://mirrors.aliyun.com/ubuntu/ xenial multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse #Added by software-properties
deb http://archive.canonical.com/ubuntu xenial partner
deb-src http://archive.canonical.com/ubuntu xenial partner
deb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted multiverse universe #Added by software-properties
deb http://mirrors.aliyun.com/ubuntu/ xenial-security universe
deb http://mirrors.aliyun.com/ubuntu/ xenial-security multiverse

#
# Canonical 合作伙伴和附加
deb http://archive.canonical.com/ubuntu/ xenial partner
deb http://extras.ubuntu.com/ubuntu/ xenial main


#
deb http://mirrors.ustc.edu.cn/ubuntu-ports/ trusty main restricted universe multiverse
deb http://mirrors.ustc.edu.cn/ubuntu-ports/ trusty-security main restricted universe multiverse
deb http://mirrors.ustc.edu.cn/ubuntu-ports/ trusty-updates main restricted universe multiverse
deb http://mirrors.ustc.edu.cn/ubuntu-ports/ trusty-proposed main restricted universe multiverse
deb http://mirrors.ustc.edu.cn/ubuntu-ports/ trusty-backports main restricted universe multiverse
deb-src http://mirrors.ustc.edu.cn/ubuntu-ports/ trusty main restricted universe multiverse
deb-src http://mirrors.ustc.edu.cn/ubuntu-ports/ trusty-security main restricted universe multiverse
deb-src http://mirrors.ustc.edu.cn/ubuntu-ports/ trusty-updates main restricted universe multiverse
deb-src http://mirrors.ustc.edu.cn/ubuntu-ports/ trusty-proposed main restricted universe multiverse
deb-src http://mirrors.ustc.edu.cn/ubuntu-ports/ trusty-backports main restricted universe multiverse

 

  

 

 

5, 输入pwd,显示当前工作目录

6, dpkg -i soft_deb 命令可以安装deb包

7, make -j4 开启4个线程make软件,之后记得sudo make install

8, 删除软件,清理垃圾

sudo apt-get purge softwarename

 

sudo apt-get autoremove
sudo apt-get clean
sudo apt-get autoclean

9, 装pcl的ppa命令,然而并没什么卵用

sudo add-apt-repository ppa:v-launchpad-jochen-sprickerhof-de/pcl
sudo apt-get update
sudo apt-get install libpcl-all

10, su后 rm -rf anything

删除各种文件,可以用通配符

 

sudo apt-get -f install

 

posted on 2016-09-25 15:10  菠菜僵尸  阅读(366)  评论(0编辑  收藏  举报