我用 LinuxLinuxLinux学习之路

Ubuntu使用笔记(1):发行版的选择与安装

2018-08-03  本文已影响10人  凌杰_owlman

使用Linux的动机和理由

想离开Windows,将工作机换成Linux系统是我多年来一直想做的事情,但直到最近才真正开始行动,其中的原因主要有以下几条:

Linux发行版的选择

Linux本身只是一个操作系统的内核项目,要使用它,我们必须要选择一款发行版,关于Linux的发行版,各位可以参考来自Wikipedia上的这张表:

Linux发行版

其实在我看来,Linux目前主流的发行版主要可分为三大分支:

我个人的选择是Ubuntu,主要原因是我不想在系统安装和配置上花费过多的时间,为此我愿意放弃一些自由度

Ubuntu的安装

由于我的机器是台32位的老机器,而Ubuntu最新版本18.04只提供64位的版本,我只能选择老一些的16.04版。具体安装过程非常简单,网上教程也很多,这里推荐几个,供各位自行参考:

以上内容都大同小异,基本上照着做即可。

安装之后必须要做的几件事

将apt的源换成国内源

由于某墙的存在和客观物理网络的问题,国外网络资源是朝不保夕的,所以强烈建议,安装完Ubuntu之后,第一件事就是将apt的源改成国内的,我这里选择的是阿里云的源,具体如下:

首先备份一下原有的国外源,以备日后需要时恢复:

cd /etc/apt
sudo cp sources.list sources.list.bak

然后打开源配置文件:

vim sources.list

将其内容改成:

# deb cdrom:[Ubuntu 16.04.4 LTS _Xenial Xerus_ - Release i386 (20180228)]/ xenial main restricted

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted
# deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted
# deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://mirrors.aliyun.com/ubuntu/ xenial universe
# deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial universe
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates universe
# deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu 
## team, and may not be under a free licence. Please satisfy yourself as to 
## your rights to use the software. Also, please note that software in 
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://mirrors.aliyun.com/ubuntu/ xenial multiverse
# deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates multiverse
# deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial-updates multiverse

## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse
# deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# 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://security.ubuntu.com/ubuntu xenial-security main restricted
deb http://mirrors.aliyun.com/ubuntu/ xenial-security universe
# deb-src http://security.ubuntu.com/ubuntu xenial-security universe
deb http://mirrors.aliyun.com/ubuntu/ xenial-security multiverse
# deb-src http://security.ubuntu.com/ubuntu xenial-security multiverse
deb https://dl.winehq.org/wine-builds/ubuntu/ xenial main
# deb-src https://dl.winehq.org/wine-builds/ubuntu/ xenial main

最后更新一下索引缓存:

sudo apt-get update

安装输入输入法

我这里选择的是输入搜狗输入法,其安装过程如下:

首先确认系统是否已经安装了fcitx,由于搜狗输入法是基于这个输入法框架的,所以必须确保它已经被安装,一般情况下,Ubuntu中文版是安装了这个框架的,如果确实没有安装,请执行以下命令:

# 1)先添加以下源
sudo add-apt-repository ppa:fcitx-team/nightly
# 2)添加源后我们更新一下系统
sudo apt-get update
# 3)开始安装fcitx
sudo apt-get install fcitx
# 如果发现有错误提示,请试一下“apt-get -f install”命令,然后再试一下sudo apt-get install fcitx。
# 4)安装fcitx的配置工具
sudo apt-get install fcitx-config-gtk
# 5)安装fcitx的table-all包
sudo apt-get install fcitx-table-all
# 6)安装im-switch工具
sudo apt-get install im-switch

然后去搜狗输入法的官网下载linux系统下的安装包,记住下载对应自己版本的文件,我这里下载的是32位的版本,文件是sogoupinyin_2.2.0.0108_i386.deb,然后进入到该文件所在的目录中使用dpkg命令安装它:

sudo dpkg -i sogoupinyin_2.2.0.0108_i386.deb
# 如果发现有错误提示,请试一下“apt-get -f install”命令,然后重新执行一下这条安装命令

这个时候是看不到效果的,一定要将系统注销,重新登录一次。然后搜索出fcitx配置,删除不需要的输入法,将搜狗输入法设为默认即可。

解决一些问题

如果耳机没有声音,建议安装PulseAudio音量控制器:

sudo apt-get install pavucontrol

它的使用非常简单,一看就会:

PulseAudio音量控制

数字键盘启动问题:

sudo apt-get install numlockx

然后编辑配置文件:sudo gedit /usr/share/lightdm/lightdm.conf.d/50-unity-greeter.conf,在该文件最后添加一行:greeter-setup-script=/usr/bin/numlockx on,然后重启系统即可。

上一篇 下一篇

猜你喜欢

热点阅读