首页 > 系统相关 >记一次archlinux+dwm的安装

记一次archlinux+dwm的安装

时间:2023-03-11 11:13:49浏览次数:47  
标签:yay pacman sudo vim etc archlinux https 安装 dwm

记一次Archlinux+dwm简单安装

联网

rfkill unblock all
dhcpcd
ping www.baidu.com -n

同步时间

timedatectl set-ntp true

换源

vim /etc/pacman.d/mirrorlist
Server = https://mirrors.ustc.edu.cn/archlinux/$repo/os/$arch
pacman -Syy

磁盘分区

mkfs.ext4 /dev/nvme0n1p2
mkswap /dev/nvme0n1p3
mkdir /mnt/boot

mount /dev/nvme0n1p2 /mnt
mount /dev/nvme0n1p1 /mnt/boot
swapon /dev/nvme0n1p3

安装基础包

pacman -Sy archlinux-keyring
pacstrap /mnt base base-devel linux linux-firmware vim dhcpcd sudo iwd bash bash-completions ntfs-3g

制作grub引导

genfstab -U /mnt >> /mnt/etc/fstab
arch-chroot /mnt

配置archcn 安装yay等

vim /etc/pacman.conf 尾部添加

[archlinuxcn]
SigLevel = Never
Server = https://mirrors.ustc.edu.cn/$repo/$arch

顺便开启
[multilib]
Include = /etc/pacman.d/mirrorlist

sudo pacman -Syyu
sudo pacman -S yay

安装基本包

pacman -S dhcpcd iwd vim sudo bash bash-completions ntfs-3g gvfs-mtp networkmanager neofetch yay zsh udisks2 udiskie
# 设置开机自启动
systemctl enable dhcpcd
systemctl enable iwd
systemctl enable NetworkManager
systemctl enable udisks2

同步时区

ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime

同步硬件时钟

hwclock --systohc

本地化

编辑vim /etc/locale.gen,然后去掉 en_US.UTF-8 UTF-8 以及 zh_CN.UTF-8 UTF-8

# 更新locale
locale-gen

创建 locale.conf 文件,并编辑设定 LANG 变量

vim /etc/locale.conf
LANG=en_US.UTF-8
echo "ArchLinux" >> /etc/hostname
vim /etc/hosts
127.0.0.1   localhost
::1         localhost
127.0.1.1   ArchLinux.localdomain   ArchLinux
passwd root

制作grub引导

pacman -S intel-ucode grub efibootmgr efivar os-prober
grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=Arch --recheck
事后可设置 vim /etc/default/grub 中 可提升启动速度
GRUB_CMDLINE_LINUX_DEFAULT="loglevel=3 nowatchdog"
GRUB_DISABLE_OS_PROBER=false

生成引导配置文件

grub-mkconfig -o /boot/grub/grub.cfg

创建用户并设置用户密码

<username> 为你自己的用户名,登录用,注意用户名必须全小写

useradd -m -G wheel -s /bin/bash <username>
passwd <username>
EDITOR=vim visudo
#把前面的注释符号 # 去掉
%wheel ALL=(ALL) ALL
systemctl enable dhcpcd
systemctl enable iwd
systemctl enable NetworkManager
pacman -S xorg-server xorg-apps xorg-xinit xorg-xclock xterm

pacman -S wqy-microhei wqy-microhei-lite wqy-bitmapfont wqy-zenhei ttf-arphic-ukai adobe-source-han-sans-cn-fonts adobe-source-han-serif-cn-fonts
yay -S ttf-fira-code

此时已可以重启正常进入系统tty了

英文字体

pacman -S ttf-dejavu

文泉驿正黑矢量字体

pacman -S wqy-zenhei
pacman -S wqy-microhei

Emoji 字体

pacman -S noto-fonts-emoji

pacman -S bluez bluez-utils
sudo systemctl enable bluetooth.service
sudo systemctl start bluetooth.service

安装git和xorg和字体并安装dwm

yay -S git
yay -S xorg
yay -S wqy-microhei
yay -S wps-office-mui-zh-cn
yay -S ttf-wps-fonts
yay -S nerd-fonts-jetbrains-mono
yay -S ttf-material-design-icons
yay -S ttf-joypixels
yay -S ttf-dejavu
sudo pacman -S xorg-server xorg-apps xorg-xinit xorg-xclock xterm
mkdir ~/workspace
cd ~/workspace
git clone https://github.com/yaocccc/dwm
git clone https://github.com/yaocccc/st
cd dwm && sudo make install clean
cd st && sudo make install clean

cp /etc/X11/xinit/xinitrc .xinitrc
echo exec dwm > ~/.xinitrc
startx # 进入系统

https://blog.csdn.net/weixin_44335269/article/details/117886927
https://www.cnblogs.com/Likfees/p/15656828.html
https://zhuanlan.zhihu.com/p/358338062
https://blog.csdn.net/lanuage/article/details/121568320
https://blog.csdn.net/weixin_44335269/article/details/117930190
https://blog.csdn.net/qq_45933858/article/details/124553077
https://zhuanlan.zhihu.com/p/112536524
https://yaocc.cc/archinstall/
https://github.com/yaocccc/picom

https://www.zhihu.com/people/MiraculousMoon/posts

https://jiuaidu.com/jianzhan/1096333/

https://yaocc.cc/page/3/#board

中文输入法

sudo pacman -S fcitx5-rime fcitx5-im fcitx5-chinese-addons fcitx5-pinyin-moegirl fcitx5-pinyin-zhwiki fcitx5-material-color
vim /etc/environment
GTK_IM_MODULE=fcitx
QT_IM_MODULE=fcitx
XMODIFIERS=@im=fcitx
SDL_IM_MODULE=fcitx
GLFW_IM_MODULE=ibus

蓝牙

Ssudo pacman -S bluez bluez-utils
sudo systemctl enable bluetooth.service
sudo systemctl start bluetooth.service
# 安装蓝牙音频
sudo pacman -S pulseaudio-bluetooth
# 蓝牙图形化管理工具安装
sudo pacman -S bluedevil
sudo pacman -S pipewire-pulse
sudo pacman -S pavucontrol

sudo vim /etc/bluetooth/main.conf
FastConnectable=true
AutoEnable=true

必备软件

pacman -S flameshot acpi xfce4-power-manager volume pcmanfm  meson cmake libev uthash libconfig feh rofi gimp nodejs npm i3lock-color screenkey
yay -S baidunetdisk-electron adwaita-blue-icon-theme-git

nvim

https://github.com/yaocccc/nvim

配置系统锁屏和关机时间

vim /etc/X11/xorg.conf.d/10-monitor.conf
Section "ServerLayout"
    Identifier "ServerLayout0"
    Option "BlankTime"  "10" 	  # 自动锁屏
    Option "StandbyTime" "20"   # 关闭屏幕
    Option "SuspendTime" "30"   # 挂起
    Option "OffTime" "60"       # 关机
EndSection

触控板轻触

yay -S xf86-input-synaptics      # 触控板

vim /etc/X11/xorg.conf.d/30-touchpad.conf

Section "InputClass"
    Identifier "touchpad"
    Driver "libinput"
    MatchIsTouchpad "on"
    Option "Tapping" "on"
    Option "TappingButtonMap" "lrm"
EndSection

tty免登录

vim /etc/systemd/system/getty.target.wants/[email protected]
update
  ExecStart=-/sbin/agetty -o '-p -f [用户名]' -n -a chenyc --noclear %I $TERM

sudo免密 加到 visudo 添加到尾部
[用户名] ALL=(ALL:ALL) NOPASSWD: ALL

用户提权
yay -S polkit
vim ~/.bashrc
#
# ~/.bashrc
#

# If not running interactively, don't do anything
[[ $- != *i* ]] && return
alias ls='ls --color=auto'
alias grep='grep --color=auto'
PS1='[\u@\h \W]\$ '
#auto startx
if [ -z "${DISPLAY}" ] && [ "${XDG_VTNR}" -eq 1 ]; then
	exec startx
fi


[ -f ~/.fzf.bash ] && source ~/.fzf.bash

vim ~/.zshrc
# Created by newuser for 5.9
#
[ $(tty) = "/dev/tty1" ] && cd ~ && startx

source ~/.config/omz/omz.zsh

[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh

永久去除蜂鸣器声音

sudo su
mkdir -p /etc/rc.d
echo "rmmod pcspkr" >> /etc/rc.d/rc.local
chmod  +x /etc/rc.d/rc.local

日常软件

yay -S lxappearance              # gui设置
yay -S paper-gtk-theme-git       # gtk主题
yay -S pavucontrol               # 音频设置
yay -S breeze-icons              # 图标
yay -S rofi                      # 菜单
yay -S flameshot                 # 截图软件
yay -S google-chrome wyeb-git    # 浏览器             
yay -S byzanz                    # gif截图依赖
yay -S wps-office-cn             # wps
yay -S libnotify dunst           # 通知 可使用 dunst -b 命令 启动通知服务
yay -S xorg-xsetroot             # dwm设置状态栏
yay -S xf86-input-synaptics      # 触控板
yay -S network-manager-applet    # 网络托盘
yay -S amf-amdgpu-pro            # amd gpu 驱动
yay -S obs-studio-amf            # obs for amd_gpu
yay -S mpc mpd ncmpcpp           # tui music player

标签:yay,pacman,sudo,vim,etc,archlinux,https,安装,dwm
From: https://www.cnblogs.com/vconlln/p/17205482.html

相关文章

  • 跟艾文学编程《零基础入门学Python》PyCharm 安装
    作者:艾文,计算机硕士学位,企业内训讲师和金牌面试官,公司资深算法专家,现就职BAT一线大厂。学习目标PyCharm下载PyCharm工具的使用利用PyCharm工具开发第一个应用程序PyChar......
  • 【Redis-安装使用】
    目录:一、安装Redis二、启动Redis三、Redis命令行客户端一、安装RedisCentOS7下安装1、单机安装Redis①Redis是基于C语言编写的,因此首先需要安装Redis所需要的gcc依赖:yum......
  • Docker安装
    背景最近接手了几个项目,发现项目的部署基本上都是基于Docker的,幸亏在几年前已经熟悉的Docker的基本使用,没有抓瞎。这两年随着云原生的发展,Docker在云原生中的作用使得它也......
  • butterfly主题安装
    1.初始化hexohexoinitMyHexoBlog2.如果没有cheerio安装[email protected]为安装主题做准备3.安装beutterflygitclone-bdevhttps://github.co......
  • Linux 安装 Wiki.js
    一、概要1.环境(1)CentOS7.92009(2)Node.js16(3)Wiki.js2.5.2972.概念Wiki.js是一个开源的知识管理系统,它是一款使用JS编写的Node.js项目,它的文档类型支持M......
  • Kuboard安装并部署springcloud微服务项目
    Kuboard安装并部署springcloud微服务项目Kuboard是一款k8s的管理界面,我认为它有页面美观(颜值即正义)、操作简洁、系统配置要求不高、对新手友好的特点。开发者认为他们......
  • node版本控制工具nvm安装教程
    1.卸载node,后删除node文件夹里的所有内容2:安装nvm管理工具(1)下载地址:https://github.com/coreybutler/nvm-windows/releases(2)设置nvm安装目录,再设置node安装目录3......
  • C#自行实现安装卸载程序(不使用官方组件)
    正规软件建议还是使用官方的标准安装程序组件,因为官方的标准安装/卸载组件能更好的与操作系统衔接,安装和卸载流程更加规范。今天提供一种野路子,全用代码实现安装卸载器。......
  • Nacos2.2.0安装启动报错
    安装Nacos2.2.0版本后,通过单机模式启动,startup.cmd-mstandalone,报如下错误:2023-03-1108:29:58,627ERRORApplicationrunfailedorg.springframework.beans.facto......
  • mac安装bee提示 zsh: command not found: bee
    无论是.bash_profile还是.zshrc文件都配置了环境变量exportGOROOT=/usr/local/goexportGOPATH=/Users/xxxx/Documents/Project/GoexportGOBIN="$GOPATH/bin"expo......