zoukankan      html  css  js  c++  java
  • 在XPS13 上安装Ubuntu 16.04

    1 准备系统安装U盘

    使用常见的光盘工具软件ultraISO。

    • (1)首先使用UltraISO打开Ubuntu-16.04.4-desktop-amd64.iso安装映像。
    • (2)在菜单栏中,选择“启动”=》“写入硬盘映像”,成功创建安装U盘。

    2 使用U盘安装Ubuntu 16.04

    • (1)启动XPS13,按“F2”键进入BIOS界面,将硬盘模式设置为ACHI,并去掉并禁止Secure Boot。

    • (2)使用安装U盘,正常安装Ubuntu 16.04系统。

    注意:安装完毕,可能重启后无法进入系统。如果出现这个问题,别着急,这是DELL XPS的一个bug,常在XPS 13 9343硬件上安装Ubuntu 15+系统时出现,可通过以下步骤补救。

    • (1)创建bootx64.efi。
      • 通过安装U盘进入U盘Ubuntu系统。
      • 进入命令行。
        # sudo mount /dev/sda1 /tmp
        # cd /tmp/EFI
        # sudo mkdir boot
        # sudo touch boot/bootx64.efi
        # sudo reboot
    
    • (2)在BIOS中创建“Ubuntu”启动项
      • 重启,按F2进入BIOS。
      • 打开“boot settings”。
      • 点击“Add Boot Option”选项,在弹出窗口中输入“Ubuntu”。
      • 在“File Name”中选择“EFI/ubuntu/shimx64.efi”
      • 勾选新建的“Ubuntu”启动项,勾掉“SAMSUNG SSD...”
      • 应用并退出。这时重启可进入系统。

    3 Wifi安装

    半天时间都浪费在这一步了。弄清楚了,很快。

    • (1)首先查看一下显卡信息。
        # lspci | grep 'network'
    
    • (2)接着查看显卡驱动信息。如果结果只看到“Local Loopback”一个网络配置,表示系统没有安装显卡驱动。
        # ifconfig
    
    • (3)安装dkms(Dynamic Kernel Module Support Framework)。这一步是目的是使Linux内核能够动态链接显卡驱动,是下一步的基础。安装驱动是“dkms_2.2.0.3-2ubuntu11.5_all.deb”。
        # sudo dpkg -i dkms_2.2.0.3-2ubuntu11.5_all.deb 
    
        # sudo dpkg -i bcmwl-kernel-source_6.30.223.271+bdcom-0ubuntu3_amd64.deb
    

    这时Wifi图片应该已经出现在右上角了。

    4 更新软件源为阿里源

        # deb cdrom:[Ubuntu 16.04 LTS _Xenial Xerus_ - Release amd64 (20160420.1)]/ xenial main restricted
        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
    

    5 安装IPTUX

    可以和windows互联互通。

    这是IPTUX在Github上的仓库

        # sudo apt-get install iptux
        # iptux
    

    6 安装PPA工具

    对于Ubuntu LTS 18.04, 16.04, and 14.04版本,通过安装software-properties-common包获取add-apt-repository命令。

        # sudo apt-get install -y software-properties-common
    

    对于Ubuntu 13.10或者更老的版本,通过安装python-software-properties包获取add-apt-repository命令。

        # sudo apt-get install -y python-software-properties
    

    注意:通过PPA安装的软件,均安装在“/usr/lib”目录下。

    7 从PPA源安装JDK8

        # sudo add-apt-repository ppa:ownername/projectname
        # sudo apt update
        # sudo apt install something
    

    在Launchpad.net上找到Oracle Java (JDK) 8 Installer PPA

        # sudo add-apt-repository ppa:webupd8team/java
        # sudo apt-get update
        # sudo apt install oracle-java8-installer
    

    8 从PPA源安装Golang

    在Launchpad.net上找到Go 1.X packages

        # sudo add-apt-repository ppa:gophers/archive
        # sudo apt-get update
        # sudo apt install golang-1.8
    

    为安装的GO编译软件添加一个软链接,放在"/usr/bin"目录下。

        # sudo ln -sf /usr/lib/go-1.8/bin/go /usr/bin/go
        # go version
    

    9 从PPA源安装Chrome

    在Launchpad.net上找到Chrome稳定版

        # sudo add-apt-repository ppa:chromium-team/stable
        # sudo apt-get update
        # sudo apt install chromium-browser
        # chromium-browser
    

    10 从PPA源安装Python2和Python3

    ubuntu 16.04预装:

    • Python 2.7.12
    • Python 3.5.2

    11 安装VIM

        # sudo apt-get install vim
    

    使用bundle来管理插件,配置参考以下几个链接:

    12 从PPA源安装搜狗拼音输入法

    • 首先删除干净fcitx
        # sudo apt-get remove fcitx*
        # sudo apt-get autoremove
        # sudo reboot
    
    • 删除~/.config/fcitx/
        # rm -r ~/.config/fcitx/
    
    • 添加PPA库
        # sudo add-apt-repository ppa:fcitx-team/nightly
        # sudo apt-get update
    
    • 安装fcitx
        # sudo apt-get install fcitx
        # sudo apt-get install fcitx-config-gtk
        # sudo apt-get install fcitx-talbe-all
        # sudo apt-get install im-switch
    
        # sudo dpkg -i sogoupinyin_2.2.0.0108_amd64.deb 
        # sudo apt-get install -f
    
    • 使用fcitx-diagnose可以获取安装fcitx的错误信息。
        # fcitx-diagnose
    

    注意:以上办法并不总是成功,如果在安装完毕后找不到搜狗输入法,可以考虑把谷歌拼音输入法一起安装。这时你可能会惊讶的发现,搜狗输入法也正常了。我猜,大概是有竞争者的存在,感到压力了。。。

        sudo apt-get install fcitx fcitx-googlepinyin im-config
    

    13 安装Markdown编辑器——Remarkable

    官网下载安装。

        # dpkg -i remarkable_1.87_all.deb
        # sudo apt-get install -f
        # remarkable &
    

    14 安装播放器smplayer

        # sudo apt-get install smplayer
    

    15 分卷压缩软件 —— rar

        # sudo apt-get install rar
        # sudo apt-get install unrar 
    
    • 分卷压缩
        # rar a -v50000k eclipse.rar eclipse
    

    对eclipse文件夹进行分卷压缩,每卷的大小为50000k,压缩后的文件名为eclipse.rar

    • 解压

    对任何一个分卷执行:

        # rar e eclipse.part1.rar
    

    16 安装下载工具qbittorrent

    $ sudo add-apt-repository ppa:qbittorrent-team/qbittorrent-stable
    $ sudo apt-get update && sudo apt-get install qbittorrent
    

    17 安装Markdown编辑器——Typora

    # for Linux
    # or run:
    # sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys BA300B7755AFCFAE
    wget -qO - https://typora.io/linux/public-key.asc | sudo apt-key add -
    # add Typora's repository
    sudo add-apt-repository 'deb https://typora.io/linux ./'
    sudo apt-get update
    # install typora
    sudo apt-get install typora
    

    需要手动开启行内公式等特性。

    18 安装gcc/g++

    • 首先添加ppa库:
    sudo add-apt-repository ppa:ubuntu-toolchain-r/test
    sudo apt-get update
    

    在这里能看到最新gcc/g++版本:

    https://launchpad.net/~ubuntu-toolchain-r/+archive/ubuntu/test?field.series_filter=trusty
    
    • 安装指定版本gcc/g++
    sudo apt-get install gcc-4.8 g++-4.8
    sudo apt-get install gcc-4.9 g++-4.9
    sudo apt-get install gcc-5 g++-5
    sudo apt-get install gcc-6 g++-6
    sudo apt-get install gcc-7 g++-7
    
    • 如果安装了同一个软件的不同版本,可以使用update-alternatives命令设置默认使用哪个版本
    # 命令最后的数字20和50是优先级,如果使用auto选择模式,系统将默认使用优先级高的
    sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 20
    sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 50
    sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-5 20
    sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-7 50
    
    • 查看所有安装版本
    $ sudo update-alternatives --query gcc
    Name: gcc
    Link: /usr/bin/gcc
    Status: auto
    Best: /usr/bin/gcc-7
    Value: /usr/bin/gcc-7
    
    Alternative: /usr/bin/gcc-5
    Priority: 20
    
    Alternative: /usr/bin/gcc-7
    Priority: 50
    
    $ sudo update-alternatives --query g++
    Name: g++
    Link: /usr/bin/g++
    Status: auto
    Best: /usr/bin/g++-7
    Value: /usr/bin/g++-7
    
    Alternative: /usr/bin/g++-5
    Priority: 20
    
    Alternative: /usr/bin/g++-7
    Priority: 50
    
    • 如果配置失误,可以使用命令去掉某个版本
    sudo update-alternatives --remove gcc /usr/bin/g++-5
    
    • 查看默认版本
    $ gcc --version
    gcc (Ubuntu 7.4.0-1ubuntu1~16.04~ppa1) 7.4.0
    
    $ g++ --version
    g++ (Ubuntu 7.4.0-1ubuntu1~16.04~ppa1) 7.4.0
    
  • 相关阅读:
    spring boot☞Swagger2文档构建及单元测试
    Spring Boot☞ 配置文件详解:自定义属性、随机数、多环境配置等
    Spring Boot☞HelloWorld开篇
    vmware workstation 12 密钥
    Spring Boot之JdbcTemplate多数据源配置与使用
    xStream完美转换XML、JSON(转)
    JAXB和XStream比较
    @RestController注解下返回到jsp视图页面
    C++中继承 声明基类析构函数为虚函数作用,单继承和多继承关系的内存分布
    mov offset和lea的区别
  • 原文地址:https://www.cnblogs.com/sword03/p/9801077.html
Copyright © 2011-2022 走看看