暗夜精灵5安装Manjaro 18.1.0 Juhraya

0.前提

暗夜精灵5 (i7-9750H/ 16G RAM /NVIDIA 1660Ti/ 512G SSD)

Manjaro 18.1.0 Juhraya(之前的版本我测试过,会卡在TTL之类的地方,网络上几乎所有的方法我都试过了,全部无效)

1.安装

1.1 制作U盘启动盘

使用etcher(https://www.balena.io/etcher/)将ISO文件写入U盘中。

1.2 设置U盘启动

开机后按F10进入BIOS(F9修改启动顺序,F12是Windows的修复工具)

提示:不要启用安全启动检查,那是为Windows10设置,否则无法启动Linux系统。

1.3 设置

图片来自(https://cloud.tencent.com/developer/article/1390999)

将driver调整为non-free,tz调整为Asia/Shanghai

然后boot进入安装环境。

1.4 安装

之前安装时,会因为英伟达显卡的问题无法安装,连这个界面都看不见。要么卡在命令行界面,要么黑屏卡死等等。同时,惠普好像屏蔽了核心显卡。而且惠普BIOS中没有关闭独立显卡的设置。

设置磁盘分区

清空磁盘,主要清理之前的Windows系统,并且设置和内存同样大小的交换内存。

然后就是安装

安装完成后,拔出U盘,并且将启动顺序改回来。

2.设置

2.1 设置华为源

sudo pacman-mirrors -i -c China -m rank //按照速度更新镜像,然后排名

华为源的速度平均2M/s。绝对杠杠滴。

2.2 设置清华源archlinuxcn

文件位置:/etc/pacman.conf

[archlinuxcn]
SigLevel = Optional TrustAll
Server = https://mirrors.tuna.tsinghua.edu.cn/archlinuxcn/$arch

2.3 设置下载器

文件位置:/etc/makepkg.conf

#axel 单线程多链接
#DLAGENTS=('file::/usr/bin/axel -n 6 -o %o %u'
#          'ftp::/usr/bin/axel -n 6 -o %o %u'
#          'http::/usr/bin/axel -n 6 -o %o %u'
#          'https::/usr/bin/axel -n 6 -o %o %u'
#          'rsync::/usr/bin/rsync --no-motd -z %u %o'
#          'scp::/usr/bin/scp -C %u %o')

DLAGENTS=('ftp::/usr/bin/wget -c --passive-ftp -t 3 --waitretry=3 -O %o %u'
 'http::/usr/bin/wget -c -t 3 --waitretry=3 -O %o %u'
 'https::/usr/bin/wget -c -t 3 --waitretry=3 --no-check-certificate -O %o %u'
 'rsync::/usr/bin/rsync -z %u %o'
 'scp::/usr/bin/scp -C %u %o')

#DLAGENTS=('ftp::/usr/bin/aria2c -s5 %u -o %o'
# 'http::/usr/bin/aria2c -s5 %u -o %o'
# 'https::/usr/bin/aria2c -s5 %u -o %o'
# 'rsync::/usr/bin/rsync -z %u %o'
# 'scp::/usr/bin/scp -C %u %o')
#'ftp::/usr/bin/aria2c -c --ftp-pasv=true -m3 -s10 -j10 --follow-torrent=false -o %o %u >&2'
#'http::/usr/bin/aria2c -c --ftp-pasv=true -m3 -s10 -j10 --follow-torrent=false -o %o %u >&2'
#'https::/usr/bin/aria2c -c -m3 -s10 -j10 --check-certificate=false --follow-torrent=false -o %o %u >&2'

根据自己喜好选择。

2.4 安装 yaourt

sudo pacman -S yaourt archlinuxcn-keyring
yaourt -Syyu

然后更新系统。

2.5 设置shell

相比于bash,我更喜欢zsh。

yaourt -S zsh
chsh -s /bin/zsh #修改普通用户的shell
sudo chsh -s /bin/zsh #修改root用户的shell

git clone https://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh #oh-my-zsh官方库,目标位置为用户目录下的.oh-my-zsh文件夹
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ~/.oh-my-zsh/plugins

git clone https://github.com/zsh-users/zsh-autosuggestions.git ~/.oh-my-zsh/plugins

启用zsh后,需要个性化设置文件~/.zshrc

这是我的

# If you come from bash you might have to change your $PATH.
  export PATH=/usr/local/bin:$PATH
 
# Path to your oh-my-zsh installation.
  export ZSH=$HOME/.oh-my-zsh
 
# Set name of the theme to load. Optionally, if you set this to "random"
# it'll load a random theme each time that oh-my-zsh is loaded.
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
# zhs的主题
  ZSH_THEME="ys"

# Set list of themes to load
# Setting this variable when ZSH_THEME=random
# cause zsh load theme from this variable instead of
# looking in ~/.oh-my-zsh/themes/
# An empty array have no effect
# ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" )
 
# Uncomment the following line to use case-sensitive completion.
# CASE_SENSITIVE="true"
 
# Uncomment the following line to use hyphen-insensitive completion. Case
# sensitive completion must be off. _ and - will be interchangeable.
# HYPHEN_INSENSITIVE="true"
 
# Uncomment the following line to disable bi-weekly auto-update checks.
# DISABLE_AUTO_UPDATE="true"
 
# Uncomment the following line to change how often to auto-update (in days).
 export UPDATE_ZSH_DAYS=7
 
# Uncomment the following line to disable colors in ls.
# DISABLE_LS_COLORS="true"
 
# Uncomment the following line to disable auto-setting terminal title.
# DISABLE_AUTO_TITLE="true"
 
# Uncomment the following line to enable command auto-correction.
# ENABLE_CORRECTION="true"
 
# Uncomment the following line to display red dots whilst waiting for completion.
# COMPLETION_WAITING_DOTS="true"
 
# Uncomment the following line if you want to disable marking untracked files
# under VCS as dirty. This makes repository status check for large repositories
# much, much faster.
# DISABLE_UNTRACKED_FILES_DIRTY="true"
 
# Uncomment the following line if you want to change the command execution time
# stamp shown in the history command output.
# The optional three formats: "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
# HIST_STAMPS="mm/dd/yyyy"
 
# Would you like to use another custom folder than $ZSH/custom?
# ZSH_CUSTOM=/path/to/new-custom-folder
 
# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
# Add wisely, as too many plugins slow down shell startup.
 
# z命令快速跳转目录     x命令解压一切文件         命令行可以直接google  
plugins=(
  git z zsh-autosuggestions extract web-search zsh-syntax-highlighting 
)
 
source $ZSH/oh-my-zsh.sh
 
# User configuration
 
  export MANPATH="/usr/local/man:$MANPATH"
 
# You may need to manually set your language environment
  export LANG=en_US.UTF-8
 
# Preferred editor for local and remote sessions
if [[ -n $SSH_CONNECTION ]]; then
  export EDITOR='vim'
else
  export EDITOR='mvim'
fi
# Compilation flags
export ARCHFLAGS="-arch x86_64"

# ssh
export SSH_KEY_PATH="~/.ssh/rsa_id"

# Set personal aliases, overriding those provided by oh-my-zsh libs,
# plugins, and themes. Aliases can be placed here, though oh-my-zsh
# users are encouraged to define aliases within the ZSH_CUSTOM folder.
# For a full list of active aliases, run `alias`.
#
# Example aliases
# alias zshconfig="mate ~/.zshrc"
# alias ohmyzsh="mate ~/.oh-my-zsh"
#

alias config="gedit ~/.zshrc"
alias cp="cp -i" # confirm before overwriting something
alias df='df -h' # human-readable sizes
alias free='free -m' # show sizes in MB
alias more=less


# 自动更新的时间间隔,单位是天,这里设置 30 天更新一次
export UPDATE_ZSH_DAYS=1

xhost +local:root > /dev/null 2>&1

# export QT_SELECT=4

export PATH=$PATH:/opt/cuda/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/cuda/lib:/opt/cuda/lib64

最后两行是我开发需要的cuda的库文件位置环境变量。

发布了16 篇原创文章 · 获赞 21 · 访问量 2万+

猜你喜欢

转载自blog.csdn.net/qq_26056015/article/details/101718515