组装 pc 安装 Windows 和 Ubuntu 双系统可能会遇到的问题

1. 介绍以下配置 这次组机用的是 40 系列显卡 + 7000 系列 AMD 处理器。 2. 安装时遇到的一些问题 2.1. windows 部分 烧录系统镜像的时候,如果用的是 MacOS,需要将 U 盘格式设置成 NTFS 格式。 因为现在 windows 的镜像中的存在大于 4 GB 的文件,所以 FAT32 无法使用。MacOS 需要安装支持 NTFS 的软件,有的需要购买,但是可以试用,用完卸载即可。 安装结束后重启,可能会发现网卡和无线网卡搜索不到信号。 因为驱动没有安装,需要上主板场商的官网下载,注意!一定要对应主板型号,不同型号的驱动大概率是没法驱动硬件的。 ...

2024年3月25日 · 1 分钟 · sun510001

对于一些git项目更新的同步方法

对于一些Fork到自己项目的git项目更新的同步方法, 这里使用NotionNext作为例子进行简单介绍. 1. 前置条件 Fork https://github.com/tangly1024/NotionNext 项目, 将自己的NotionNext项目克隆下来. 新建一个分支new_branch git checkout -b new_branch 所有对项目的修改都在这个分支上完成, commit and push. 添加原项目的url到本地. git remote add remote https://github.com/tangly1024/NotionNext.git git remote add [remote名称] [项目克隆url] git remote -v # 可以看到目前仓库的remote信息 ...

2023年10月28日 · 1 分钟 · sun510001

火绒阻止 windows 更新

打开火绒设置-安全设置-高级防护-自定义防护-添加规则, 添加保护对象, 阻止该路径下所有文件操作. C:\Windows\SoftwareDistribution\Download\*

2023年3月9日 · 1 分钟 · sun510001

威联通QNAP Nas 相关问题

Nas静音 威联通Nas买来之后每天3点都会自动开始一些计划任务, 关闭后晚上安静不少 关于计划任务的说明和操作在这里 Add items to crontab # ┌───────────── minute (0 - 59) # │ ┌───────────── hour (0 - 23) # │ │ ┌───────────── day of the month (1 - 31) # │ │ │ ┌───────────── month (1 - 12) # │ │ │ │ ┌───────────── day of the week (0 - 6) (Sunday to Saturday; # │ │ │ │ │ 7 is also Sunday on some systems) # │ │ │ │ │ # │ │ │ │ │ # * * * * * <command to execute> 问题是执行sudo crontab /etc/config/crontab && sudo /etc/init.d/crond.sh restart 命令之后, 一些任务又会自动重置 0 3 * * * /sbin/vs_refresh 4 3 * * 3 /etc/init.d/backup_conf.sh 解决方法: 问题出在/etc/init.d/crond.sh 上, 修改之 ############# # 46行 echo "0 3 * * * /sbin/vs_refresh" >> /etc/config/crontab # 或者新版 46行 local time=$(/sbin/getcfg vs_refresh schedule -d '13:0') ############ # 88-97行 1) #once a day echo "4 13 * * * /etc/init.d/backup_conf.sh" >> /etc/config/crontab ;; 30) #once a month echo "4 13 3 * * /etc/init.d/backup_conf.sh" >> /etc/config/crontab ;; 7) #once a week echo "4 13 * * 3 /etc/init.d/backup_conf.sh" >> /etc/config/crontab ;; *) #for testing echo "*/3 * * * * /etc/init.d/backup_conf.sh" >> /etc/config/crontab ;; 重启nas可能会重置设置 需注意. ...

2022年11月16日 · 3 分钟 · sun510001

无法远程连接Linux服务器故障排查记录

服务器ssh服务 在服务器上查看ssh服务, 或直接用本账号直接登陆服务器. 查看服务器网络服务, 打印路由表 ifconfig 或 ip addr ip route show route ping 查看是否ping通或有没有被跳转到其他ip地址 其他设备 ping 服务器 服务器 ping 其他设备 其他设备 ping 网关 服务器 ping 网关 查看防火墙设置 iptables -L 查看系统日志 需要事先启动服务 Ubuntu系统配置日志/var/log/message ...

2022年2月14日 · 2 分钟 · sun510001

谷歌上搜不到我的博客?!

1. 将自己的博客加入谷歌的search-console 打开 search-console Google Search Console 添加自己的网站域名, 自建博客的话可以选择网址前缀 确认后, 谷歌会生成一个googlexxxxxxxxxxxxx.html 文件, 将这个文件加入自己博客的public文件夹, 更新博客之后, 就可以完成认证. 进入自己网站的 search-console 之后, 在顶端的搜索栏搜索自己的网站域名, 会显示网址尚未被收录到 Google, 点击提交请求, 等待1-2分钟, 如果你的网站可以被爬取, 那么会显示网址已收录到 Google. 一般等待1天就可以在谷歌搜索中查到自己的网站内容. 可以谷歌搜索: site:[自己网站的域名] ...

2021年9月1日 · 2 分钟 · sun510001

Linux 问题整理

Linux Ubuntu 20.04 系统安装流程 NVIDIA-SMI has failed because it couldn’t communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running. $ sudo add-apt-repository ppa:graphics-drivers/ppa $ ubuntu-drivers devices $ sudo apt install nvidia-driver-460 # edit GRUB_CMDLINE_LINUX_DEFAULT in /etc/default/grub. 可以不用 GRUB_CMDLINE_LINUX_DEFAULT="quiet splash pci=realloc" or GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" $ sudo update-grub $ sudo reboot 移动文件夹下所有文件, 包括子文件夹下的内容 Open a terminal and execute this command: mv -v ~/Downloads/* ~/Videos/ It will move all the files and folders from Downloads folder to Videos folder. To move all files, but not folders: If you are interested in moving all files (but not folders) from Downloads folder to Videos folder, use this command find ~/Downloads/ -type f -print0 | xargs -0 mv -t ~/Videos To move only files from the Download folders, but not from sub-folders: If you want to move all files from the Downloads folder, but not any files within folders in the Download folder, use this command: find ~/Downloads/ -maxdepth 1 -type f -print0 | xargs -0 mv -t ~/Videos here, -maxdepth option specifies how deep find should try, 1 means, only the directory specified in the find command. You can try using 2, 3 also to test. 文件大小查看命令 查看某一个文件夹的大小 du -sh [文件夹] 查看当前文件夹下的文件大小总和 ls | wc -l 文件查找命令 查找遍历文件夹下所有文件后缀为jpg的文件并复制 find [查找文件夹] -name "*.jpg" | xargs -i cp {} [输出文件夹] 批量执行命令 awk 查找文件后批量处理 ls | grep zip | awk -F . '{system("echo " $1)}' "ffmpeg -i " $1 ".wav -ar 36000 ../Wave_2/" $1 ".wav" for %a in ("*.wav") do ffmpeg -i "%a" -ar 36000 "\%~na.wav" script 输入参数: 直接写 $1 就是第一个参数 获得当前文件夹名 echo $(basename $(pwd)) DNS服务器地址修改 找到/etc/resolv.conf nameserver 就是DNS服务器地址 图形界面添加自动启动项 gnome-session-properties 文本界面设置子启动服务 写服务文件,如nginx.service、redis.service、supervisord.service [Unit]:服务的说明 Description:描述服务 After:描述服务类别 [Service]服务运行参数的设置 Type=forking 是后台运行的形式 ExecStart 为服务的具体运行命令 ExecReload 为服务的重启命令 ExecStop 为服务的停止命令 PrivateTmp=True 表示给服务分配独立的临时空间 注意:启动、重启、停止命令全部要求使用绝对路径 [Install] 服务安装的相关设置,可设置为多用户 WantedBy=multi-user.target 文件保存在目录下:以754的权限。目录路径:/usr/lib/systemd/system/ 设置开机自启动 [root@localhost ~]# systemctl enable nginx.service [root@localhost ~]# systemctl enable supervisord 停止开机自启动 [root@localhost ~]# systemctl disable nginx.service [root@localhost ~]# systemctl disable supervisord 验证一下是否为开机启动 [root@localhost ~]# systemctl is-enabled nginx [root@localhost ~]# systemctl is-enabled supervisord 开机自动启动脚本 写脚本放入/etc/profile.d/ Ubuntu引导损坏 引导修复 双系统Ubuntu 引导修复(Boot Repair)_碧海凌云的博客-CSDN博客_ubuntu引导修复 linux 使用rar https://www.rarlab.com/download.htm找到对应linux的压缩包 wget https://www.rarlab.com/rar/rarlinux-x64-6.0.2.tar.gz tar -xvf rarlinux-x64-6.0.2.tar.gz cd rar sudo make # 解压 unrar x xxx.rar # 压缩 ubuntu tar 多线程压缩 安装pigz apt-get install -y pigz 压缩文件夹(默认占用所有cpu核心, 占用率50%-80%) tar --use-compress-program=pigz -h -cvpf [tar file name] [dir] 解压文件夹 tar --use-compress-program=pigz -xvpf [tar file name] -C [dir] 需要限制cpu占用的话 taskset -c [core number start]-[core number end] [command] 向压缩包里追加文件 tar -rvf [tar file name] [file you need to add] 格式化新的磁盘 Installing A New Hard Drive InstallingANewHardDrive Start parted as follows: sudo parted /dev/sdb Create a new GPT disklabel (aka partition table): (parted) mklabel gpt Set the default unit to TB: (parted) unit TB Create one partition occupying all the space on the drive. For a 4TB drive: (parted) mkpart Partition name? []? primary File system type? [ext2]? ext4 Start? 0 End? 4 Check that the results are correct: (parted) print There should be one partition occupying the entire drive. Save and quit “parted”: (parted) quit Command Line Formatting To format the new partition as ext4 file system (best for use under Ubuntu): sudo mkfs -t ext4 /dev/sdb1 To format the new partition as fat32 file system (best for use under Ubuntu & Windows): sudo mkfs -t fat32 /dev/sdb1 As always, substitute “/dev/sdb1” with your own partition’s path. 匹配k380键盘 可能成功 Pairing LOGITECH K380 in Ubuntu 20.04 Arch Linux 开发常用组件安装,遇到gcc之类的基础组件缺失时使用 apt-get install build-essential 向日葵 远程登录失败问题 需要轻量化桌面 sudo apt install lightdm 查看某个文件夹下文件或文件夹的数量(递归) # 查看文件数量 ls -lR | grep "^-" | wc -l # 查看文件夹数量 ls -lR | grep "^d" | wc -l 非root用户cuda安装 安装CUDA和cuDNN到指定目录_kxqt233的博客-CSDN博客_cudnn安装位置 磁盘空间清理 rm -rf ~/.cache/pip conda clean -a htop设置 使用htop命令查看进程的时候可以关闭重复线程方便查看 F2 (Setup) -Display options --Hide userland threads F10 (Done) Ubuntu 隐藏上方状态栏、左边任务栏及菜单按钮移到下方居中及隐藏(详细) Ubuntu 隐藏上方状态栏、左边任务栏及菜单按钮移到下方居中及隐藏(详细)_锵锵锵锵~蒋的博客-CSDN博客_ubuntu隐藏任务栏 ubuntu 20.04 vps 开机自启动 cd /etc/profile.d/ vim xxx.sh chmod a+x xxx.sh zip相关指令 1.1. 查看压缩包内容和统计 zip -sf images.zip | grep -v *.jpg | wc -l zip -sf: 查看zip压缩包内容 grep -v: 去除不需要的行, 筛选需要的文件名 wc -l: 按行统计 1.2. 解压压缩包内部分文件 zip -sf images.zip | head -n 10 # 查看压缩包前10行内容 unzip images.zip "images/00001/000003.jpg" -d . # 解压单个文件到当前文件夹 1.3. 批量压缩文件夹并删除原文件夹 find . -maxdepth 1 -type d ! -name "." -exec sh -c 'zip -r -6 "{}.zip" "{}" && rm -r "{}"' \; ...

2021年8月1日 · 8 分钟 · sun510001

Python 问题整理

PIP spacepy安装失败 pip install git+https://github.com/spacepy/spacepy.git pip换源 修改 ~/.pip/pip.conf (没有就创建一个) [global] timeout = 6000 index-url = https://pypi.tuna.tsinghua.edu.cn/simple trusted-host = pypi.tuna.tsinghua.edu.cn 使用默认源 pip install 模块名 -i https://pypi.org/simple 快速使用指定源 pip install 模块名 -i https://pypi.tuna.tsinghua.edu.cn/simple pip install 模块名 -i https://pypi.douban.com/simple/ 使用proxy下载, 开着vpn就无法使用第三方源, 这时需要使用—-proxy --proxy http://127.0.0.1:xxxx conda直接输入 windows terminal 调用虚拟环境 # 管理员打开powershell set-executionpolicy remotesigned ...

2021年8月1日 · 6 分钟 · sun510001

Windows 问题整理

Windows 10 win10下使用vim win10-PowerShell下使用vim_秋雨、、的博客-CSDN博客_powershell vim windows启动时隐藏cmd窗口 隐藏system窗口你也行(就是那个cmd窗口,好多方法)_冷月醉雪的博客-CSDN博客 删除Windows10侧边栏项目 如果您需要删除【资源管理器】左边面板的OneDrive图标,您可以尝试: 前往C:\Users<用户名>,看看有没有不需要的文件夹 如果有关OneDrive图标依然存在,您可以登陆管理者账号,然后参考下方方法: 注册表为系统的主要档案,任何修改可能会导致系统档案损毁。 请您在修改注册表前衡量风险。 有关备份注册表的方法,请参考微软官方资讯: http://support.microsoft.com/kb/322756 同时按【win键+R】,输入regedit,打开【注册表】 前往【hkey_current_user\software\microsoft\windows\currentversion\explorer\desktop\NameSpace】 左边面板,【NameSpace】文件夹下,点击不同的文件 右边面板,留意【数据】栏部分,找到与您不需要的OneDrive账户的相关文件夹 左边面板,对有关文件夹,右键删除 重启电脑,看看效果 wsl虚拟机无法ping host 改防火墙规则 WSL2 unable to ping host machine · Issue #4171 · microsoft/WSL ssh 端口映射 ssh -L [收听接口:]收听端口:目标主机:目标端口 username@hostname # 多端口 ssh remote-host -L 8822:REMOTE_IP_1:22 -L 9922:REMOTE_IP_2:22 vscode正则表达式批量替换 查找:"static/(.*).css 替换:"static/css/$1.css # $1是group1匹配到内容之后需要保留的变量. ([A-Za-z-0-9\.' ,?\\:\/!;%$@&()—£={}<>á`ñ’´\[\]*\^]+) ([A-Za-z-0-9\.' ,?\\:\/!;%$@&()—£={}<>á`ñ’´\[\]*\^]+) windows openssh 安装 windows 会出现openssh安装失败的情况 常规安装方法 其他方法 基于PowerShell的OpenSSH下载最新软件: https://github.com/PowerShell/Win32-OpenSSH/releases 到openssh安装文件夹下, 运行命令 powershell.exe -ExecutionPolicy Bypass -File "D:\Download\OpenSSH-Win64\install-sshd.ps1" # 启动ssh net start sshd # 设定自启动, 也可以直接在服务中启用自动 sc.exe config sshd start= auto 如果自启动失败(windows10 [SC] OpenSCManager 失败 5) 此问题是因为用户没有在控制账号下登录,所以安装出问题(新装的系统,没有设置登录密码)。 运行–>输入regedit–>依次找到HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System\ 将EnableLUA的值改为0,最后重启电脑,再次操作,即可。 进服务, 设定两项openssh服务为自动 启动服务后可以通过 netstat 命令查看 SSH Server 服务是不是已经开始监听默认的 22 号端口了: 打开C:\ProgramData\ssh\sshd_config 修改端口 Port 65001 PubkeyAuthentication yes 客户端创建公钥 keygen -R # 服务器将公钥放入administrators_authorized_keys文件中 cd C:\ProgramData\ssh mv id_rsa.pub administrators_authorized_keys ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQC01uhrVXfP83HroGkgFvJauDUa86RG9JkhDShIVFVt6wBZfy+CHmZkl2HrZL064njETE8eNwtBJwSATRuPb5TsQv7i2+7RGOusRNpx3+/hoUW4fypBUn8qyPzw+OimjAQKvNF3kp1WZ8YZ7aeogZzTOeCejAPJ4Y26Rth5r3g4e0sk5J+lI/tTyw7bpB2qkxRa2SSbfBsuVcnyejAkYK5rQzG6Du4ckVl2d5d9mdZ24lzI8KF3s2m1/EcZI1w5VVy9dwmfp3CEIZxVqNQySIbvk18ZyJhanAjnjtmmlwX4V4ULdUyQ32dGc7+HMBBY1ec4ThOjPP0m58fYvn6sBIkL45Kh2SNpF1tHrmdj3AHkJ1/oac7ZqxjJsWTObG4TQ8puoCQVPNt+SzQI2c7d0dNWxfjlYTw8QduYH5kFZSng+KqaLbnldg9vrRy3+cYXyEtt2oM2tYjxvQUmCg5QEQIoZDjFDYcGwmwx0FgBkjBmoqxywj0pYJLzeFsJGZxZ1Mk= sun@DESKTOP-L98U77R 解决VM 与 Device/Credential Guard 不兼容。在禁用 Device/Credential Guard 后,可以运行 VM 的方法 步骤一:禁用Device Guard或Credential Guard: 禁用用于启用Credential Guard的组策略设置。 在主机操作系统上,右键单击“开始” > “运行”,键入gpedit.msc,然后单击“ 确定”。本地组策略编辑器打开。 转至本地计算机策略 > 计算机配置 > 管理模板>系统 >Device Guard(或者是: 设备防护) > 启用基于虚拟化的安全性。 选择已禁用。 转到“ 控制面板” >“ 卸载程序” >“ 打开或关闭Windows功能”以关闭Hyper-V。 选择不重启。 步骤二:通过命令关闭Hyper-V(控制面板关闭Hyper-V起不到决定性作用,要彻底关闭Hyper-V) 以管理员身份运行Windows Powershell (管理员)(Windows键+X) bcdedit /set hypervisorlaunchtype off 重启. $‘\r‘: command not found的解决方法 去除Shell脚本的\r字符: sed -i 's/\r//' one-more.sh faststone 注册码 name:bluman serial/序列号/注册码:VPISCJULXUFGDDXYAUYF windows下读取ext4格式磁盘 官方下载地址: https://china.paragon-software.com/home-windows/extfs-for-windows/download.html Paragon ExtFS for Windows 4.2.651 下载安装 然后下载补丁 V1.2 by TSRh paragon.extfs.fixed.winall.read.nfo.keygen-tsrh 把keygen和另外两个文件放到ExtFS的安装目录下 我的安装目录是 “C:\Program Files (x86)\Paragon Software\ExtFS for Windows" 打开keygen,先点击Patch RSA 2048,选择安装目录下的 Paragon ExtFS for Windows.exe 再次点击 Patch RSA 2048,选择安装目录下的 extservice.exe 点击Generate让生成License,keygen会重启ExtFS的服务。 之后打开 ExtFS 就发现已经破解完成。 双系统罗技k380配对 系统及蓝牙键盘信息: Windows版本:Windows 7 Ubuntu版本:Ubuntu 12.04(64位) 蓝牙键盘:罗技K480 首先在Ubuntu下进行配对。使用ubuntu自带的蓝牙菜单进行配对,提示的配对密码是错误的。需要使用hcidump工具查找出真正的密码。详细步骤如下: 打开终端,输入如下命令安装bluez-hcidump sudo apt-get install bluez-hcidump 使用hcidump工具开始抓取蓝牙配对密码 sudo hcidump -at | grep pass 在Ubuntu蓝牙菜单中,按照提示添加设备。 Ubuntu搜索到蓝牙键盘后,点击连接。此时hcidump会抓到正确的密码,如下所示,在蓝牙键盘上输入此密码并按回车即可配对成功。(切记不要输入配对菜单提示的错误密码) bdaddr 00:1F:20:F0:EF:75 passkey 224095 (注意记录下此处蓝牙键盘的物理地址 00:1F:20:F0:EF:75) 进入windows进行重新配对,配对成功后,上述ubuntu的配对则会失效。因为配对的key信息已经修改。我们要做的是取出当前蓝牙键盘与windows配对使用的key,将其复制到Ubuntu下的linkkeys文件即可。 下载PsExec: http://technet.microsoft.com/en-us/sysinternals/bb897553.aspx 解压后,找到PsExec.exe. 右键点击,在其属性->兼容性中勾选“以管理员身份运行此程序” 运行cmd, 进入命令行,切换到PsExec.exe所在的目录,执行如下命令打开注册表编辑器:PsExec.exe -s -i regedit.exe 找到HKEY_LOCAL_MACHINE\SYSTEM\ControlSet002\services\BTHPORT\Parameters\Keys\aa1111111111\00:1F:20:F0:EF:75中的数据项(如f33a8cadac63b019e8533590b2821357),记录下来。(自己敲键盘记住吧,无法直接复制) 计算机\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\BTHPORT\Parameters\Keys\f8e4e3e5ae56 将windows下配对产生的key复制到Ubuntu配对文件中。 重启进入Ubuntu 将在windows中记录的key信息,找到文件/var/lib/bluetooth/AA:11:11:11:11:11/linkkeys的对应00:1F:20:F0:EF:75的配对信息,替换掉。 重启ubuntu(必须重启,否则使用的还是原来的key信息) 系统无故自动重启 【Kernel-Power】系统已在未先正常关机的情况下重新启动。如果系统停止响应、发生崩溃或意外断电,则可能会导致此错误。 ...

2021年8月1日 · 10 分钟 · sun510001

其他问题整理

Hugging face hugging face的预训练模型下载慢的问题(使用BertModel.from_pretrained()等下载慢)_#苦行僧的博客-CSDN博客 (1) ...

2021年8月1日 · 2 分钟 · sun510001