Fullstar

Archives

  • December 2025
  • August 2024
  • July 2024
  • February 2024
  • November 2023
  • August 2023
  • July 2023
  • January 2023
  • November 2022
  • October 2022
  • September 2022
  • February 2022
  • January 2022
  • September 2021
  • January 2021
  • December 2020
  • November 2020
  • October 2020
  • September 2020
  • August 2020
  • July 2020

Categories

  • Code
  • Lens
  • Life
0
Fullstar
  • Code

Setting Up and Maintaining a Ubuntu Environment for My Home Server

  • November 24, 2023
  • Brandon
Total
0
Shares
0
0
0

Best Practice to Keep the Ubuntu Environment Clean

Package installation

There are normally two ways to install packages, one is apt get, another is pip install. The first difference between them is that the packages installed by apt get are the system-level packages requiring root privilege, and for pip install, you can specify the user by –user to keep from messing up the system environment (ALWAY DO NOT USE sudo pip install). The second difference which can be more important is that when executing sudo apt update && apt upgrade, the packages installed by apt would be upgraded, while the packages installed by pip wouldn’t. So in my view, the best practice to install packages:

  1. Try apt search and install by apt first.
  2. Download virtualenv to manage the Python environment and manage packages.
  3. Install the package by pip inside the virtual env.

System Setting Up

Ok, so I had a hard time fixing my wifi and Bluetooth on my new mini PC. Since the CPU of my PC is n100, just too new to be compatible with the wifi and Bluetooth.

WIFI Fixing Process

Firstly, I downloaded Ubuntu 22.04.3 LTS and noticed that on the desktop, there was totally no wifi label, after searching, I found that I could simply upgrade my kernel to 6.4 to fix this problem (Since I had not wifi, so I had to go this site: https://kernel.ubuntu.com/mainline/v6.4/amd64 and manually downloaded the four deb files and installed them by apt command). However, I could see the wifi label and connect to my phone hotspot network, but I could not get access to my college network. Thankfully, this post gave a solution: https://askubuntu.com/questions/286915/cant-connect-to-specific-wifi-network?rq=1.

sudo ifconfig eth0 down
sudo modprobe -r iwlwifi
sudo modprobe iwlwifi 11n_disable=1

The eth0 should be replaced by your wireless device ID. So the above command simply modifies the mod parameter 11n_disable to 1, disabling the 802.11n support for the iwlwifi module. And I made it a script, since every time you reboot your system, you need to run the commands again.

Bluetooth Fixing Process

I simply followed the method offered in this post: https://github.com/batocera-linux/batocera.linux/issues/9288 and enabled my Bluetooth successfully.

cd /lib/firmware/intel/
ln -s ibt-1040-4150.ddc ibt-0040-1050.ddc
ln -s ibt-1040-4150.sfi ibt-0040-1050.sfi
lsmod | grep '^bluetooth'
bluetooth            1101824  37 btrtl,...
rmmod ...
modprobe ...

Cloudflare Tunnel SSH Setting

Since I already have a domain name, instead of using a tool such as FRP, I finally chose to use Cloudflare Tunnel which is free and easy to implement (https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/). By the way, I quickly set up my ufw and ssh service to only allow the OpenSSH application and accept only ssh key login.

Total
0
Shares
Share 0
Tweet 0
Pin it 0
Brandon

Previous Article
  • Code

Swift Learning Log

  • August 31, 2023
  • Brandon
View Post
Next Article
  • Code

Golang入门

  • February 4, 2024
  • Brandon
View Post
You May Also Like
View Post
  • Code

WordPress 后台任务利器:使用 BGRunner 构建可靠的异步处理

  • Brandon
  • December 14, 2025
View Post
  • Code

WordPress image offload

  • Brandon
  • December 14, 2025
View Post
  • Code

ComfyUI应用手册

  • Brandon
  • December 6, 2025
View Post
  • Code

Leetcode Java常用代码

  • Brandon
  • February 17, 2024
View Post
  • Code

Golang入门

  • Brandon
  • February 4, 2024
View Post
  • Code

Swift Learning Log

  • Brandon
  • August 31, 2023
View Post
  • Code

English Learning – Food Related

  • Brandon
  • August 31, 2023
View Post
  • Code

Emacs for Java

  • Brandon
  • January 16, 2023

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Fullstar

Input your search keywords and press Enter.