安装debian 10 buster 之后你需要做的几件事情
在这里就不介绍如何安装 debian 10 系统了,我安装的是amd64。
系统下载地址:
https://www.debian.org/distrib/.
其实很简单的u盘刻录,然后按照步骤一步步来就好,新手有磁盘推荐分区就不介绍了。主要介绍安装debian 10 之后,如何才能让系统达到或者超过windows 10 体验感。
1.修改debian10 的源
使用命令:系统自带的编辑器 gedit /etc/apt/sources.list
或者 vi /etc/apt/sources.list
或者 vim /etc/apt/sources.list
一种是http的另外一种是https的,网速不一样。
# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb http://mirrors.tuna.tsinghua.edu.cn/debian/ buster main contrib non-free
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ buster main contrib non-free
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ buster-updates main contrib non-free
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ buster-updates main contrib non-free
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ buster-backports main contrib non-free
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ buster-backports main contrib non-free
deb https://mirrors.tuna.tsinghua.edu.cn/debian-security buster/updates main contrib non-free
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian-security buster/updates main contrib non-free
deb [arch=amd64] https://download.docker.com/linux/debian buster stable
将上面拷贝进来,保持即可。
使用命令:
sudo apt-get update
更新即可!
有一个可以下载所有版本源地址的地方,我给忘记在哪找到了的,这个10 的源亲测可以用!
2 . 安装显卡驱动
我的系统刚安装好之后,进入页面会特别卡的,我以为是系统安装有问题,后来才发现是没有显卡驱动,系统的gonme环境带不动,以前安装过debian 9 系统,在安装显卡驱动的时候花了两天时间才弄好,简直是煎熬,后来用了一段时间windows结果发现还是debian好用,然后就直接使用了最新版本,说实话,我现在已经使用了好几个月,发现debian10 是真的好用,安装显卡驱动都是如此简单 。
直接使用命令:
sudo apt install nvidia-settings
安装时会提示与X冲突,没关系,确认,安装完重启就好了
亲测可以使用,我的显卡类型是英伟达的Nvidia GTX系列,其太类型的没有试过,可自行百度 !
3.安装wifi驱动
如果安装debian10系统的时候没有链接网络,一般wifi驱动是安装不上去的,会给你提示缺少iwlwifi固件:
sudo apt update
sudo apt install firmware-iwlwifi
此时可以直接使用,gnome环境是右上角出现wifi选项,记得是不用重启系统。
4.动态磁盘的识别
我在使用windows 的时候由于手贱,将磁盘的状态改成了动态磁盘,结果安装好系统之后识别不出来,
使用命令:
sudo fdisk -l
出现:
Disk /dev/sdb: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: ST1000LM048-2E71
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 605C64FC-1336-4F0A-AB0D-2B7E1C37D4D5
Device Start End Sectors Size Type
/dev/sdb1 34 2081 2048 1M Microsoft LDM metadata
/dev/sdb2 2082 262177 260096 127M Microsoft reserved
/dev/sdb3 262178 1953525134 1953262957 931.4G Microsoft LDM data
Partition 1 does not start on physical sector boundary.
Partition 2 does not start on physical sector boundary.
Partition 3 does not start on physical sector boundary.
的时候明明可以看到磁盘,但就是识别不出来,里面都是我的重要文件啊,还好系统debian系统足够强大!
可以看到磁盘类型是 Microsoft LDM data,LDM动态磁盘啊,所以需要相应的程序来处理这样状态:
- 使用命令:
sudo apt-get install ldmtool
- 以管理员权限进入:
sudo ldmtool
此时进入状态:
ldm>
- 扫描磁盘:
ldm> scan /dev/sdb
这是磁盘的 guid:
ldm>
[
"6a38725d-e0c3-11e9-9f44-d45ddf12edea"
]
如下命令:
ldm> show
show diskgroup <guid>
show volume <disk group guid> <name>
show partition <disk group guid> <name>
show disk <disk group guid> <name>
ldm>
根据需要显示,例如:
ldm> show diskgroup 6a38725d-e0c3-11e9-9f44-d45ddf12edea
{
"name" : "CHINA-20190410L-Dg0",
"guid" : "6a38725d-e0c3-11e9-9f44-d45ddf12edea",
"volumes" : [
"Volume2",
"Volume1"
],
"disks" : [
"Disk1"
]
}
- create 磁盘:
其实直接使用命令 create all 就会将该磁盘下的所以分区识别出来了,如果只想使用某一个分区例如 “Volume1” 或者 "Volume2"使用命令 create volume [guid] [name]
ldm> create all
[
"ldm_vol_CHINA-20190410L-Dg0_Volume2",
"ldm_vol_CHINA-20190410L-Dg0_Volume1"
]
此时该磁盘的所以分区都会显示出来,直接在住文件下就能找到相应的磁盘。
如下链接你可以找到你想要的所有:
http://manpages.ubuntu.com/manpages/trusty/man1/ldmtool.1.html
4.磁盘挂载
- 临时挂载磁盘:
mount /dev/sdb1 /disk/dir
将磁盘/dev/sdb1磁盘下的文件挂载到/disk/dir目录下
取消挂载:
nmount /dev/sdb1
- 开机挂载:
使用命令打开文件
sudo vim /etc/fstab
最下面填入:
:磁盘名 挂载到哪个目录 文件类型,linux可以是ext2、ext3,ext4,windows下的磁盘文件类型一般是ntfs 后面默认就好 中间有一个空格就好
/dev/sdb1 /disk/dir ext4 defaults 0 0
5.其他配置
此时应该一些基本的东西就都有了,显卡驱动,wifi驱动,磁盘数据等,如果要开发使用的话,你就需要安装其他的一些软件啥的:
- 安装jdk,卸载默认的openJDK
- 安装mysql
- 安装idea,以及debian下破解最新idea
- 安装vscode
- 安装maven
- 安装git以及管理工具推荐使用GitKraken
- 安装google浏览器
- 安装navicat或者mysql-bench
时间有限,在这里就不写了,直接百度就可以了,都很简单!
恭喜你,这个使用你就可以正常使用了,体验效果强于windows,如果办公的话你可以使用linux版本的Dingding 或者直接使用网页版就好:https://im.dingtalk.com/。正常办公啥的完全够用了。