New · Some things to do when you get the raspberry pie

Damn! I am very angry ah ah ah ah ah !!!!

I was doing nothing and I saw that Raspberry Pi was eating ash. I thought about changing the system to try it, but the damn Ubuntu Mate system ate my card directly!!

The thing is, like I said above, Raspberry Pi has been eating ash for years, and he’s trying to get a second life with a new system.

After downloading Ubuntu Mate, I decided that the GNOME desktop was too jammed and not worth it. I decided to switch it back to Raspberry Pi instead. As a result, that card became invalid 🙃

No matter what tools you use, all kinds of tools: low grid, mass production, official fixes, formatting, partitioning, command line, dedicated disk management systems can’t be saved. The card is now read-only, so you can’t re-mount any of its contents. Check the bad way is also a healthy green one. But it couldn’t be saved…

Later, using the Hex tool, one of the two partitions was destroyed, but not completely.

(If anyone has encountered this situation and knows how to help, please advise)

I bought a new card. The system used this time is: 2021-05-07-Raspios-Buster – Armhf. IMG

This is the Raspberry Pi 3 Model B Rev 1.2

This article is for people who have a bit of a Raspberry Pi or Linux background, or you can check out my old article, which has detailed instructions on what to do once you get your hands on the Raspberry Pi

1. The system

I’ve already written a detailed article on this and I’m not going to go into it here, but you can look at some of the things that you do when you get the raspberry pie

Install the system to the SD card, and then ready to HDMI, mouse, keyboard can be connected to the boot

1.1. Raspberry pi configuration

Raspberry Pi Configuration is in the menu preferences at the top left, or you can do it from the command line:

sudo raspi-config

After boot, enter Raspberry Pi Configuration for setting. What to set can be set from one by one, and choose the Settings you like.

Generally need to be configured:

  • System: WiFi connection, system user and password
  • Display: Default resolution
  • Function: Enable SSH
  • Localization: language, time zone, keyboard, WiFi
  • Advanced: Expansion plate

1.2. Update the Raspberry Pi configuration

My own operating habit is to set up and then update the tool, in case there is a problem with the basic configuration is not set, but can not update, anyway, not much change.

1.3. The File system expantion

This is the “Advanced: Expansion Plate” I mentioned in the first point. Since the Raspberry Pi system tends to have a lot of unused space after it’s burned, it’s important to manipulate this to make it all work. Remember to reboot when you’re done to make it work.

1.4. Add Vim and modify the source

Because its built-in vi in the system is incomplete, as far as I am concerned, it can’t be used at all. Therefore, I installed a normal Vim first before changing the source, and then I will modify its APT source. If you don’t use Vim, you can skip this step.

sudo apt install vim

Modify into domestic source can use Tsinghua source, their official website has a detailed introduction how to do

Since I am using BUSTER, all I need to do is:

/etc/apt/sources.list: /etc/apt/sources.list: /etc/apt/sources.list: /etc/apt/sources.list: /etc/apt/sources.list:  deb http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ buster main non-free contrib rpi deb-src http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ arcade main non - free contrib rpi # editor ` / etc/apt/sources. List. D/raspi. List ` files, delete all content of the original file, use the following instead:  deb http://mirrors.tuna.tsinghua.edu.cn/raspberrypi/ buster main ui

Note: Repeating Raspbian twice at the end of the URL is required. This is because Raspbian’s repository contains more code than just APT software sources. The APT software source is not in the repository root directory, but in the raspbian/ subdirectory.

In addition, you can use this command to check your own Debian size:

lsb_release -a

For example, I will show:

pi@raspberrypi:~ $ lsb_release -a
No LSB modules are available.
Distributor ID:    Raspbian
Description:    Raspbian GNU/Linux 10 (buster)
Release:    10
Codename:    buster

If you look at the Description line you can see that this is a Debian 10-Buster.

Be sure to update the source list after the changes:

sudo apt-get update

1.5. Docker

Since I’m a developer and use Docker a lot, I installed it. You can skip this step if you don’t need it.

The easiest installation is this:

sudo curl -sSL https://get.docker.com | sh

It will be installed as soon as the command is finished.

Or you can do it manually in other ways, as explained on Docker’s website.

1.6. The ladder

Everyone knows. Skip this step if you don’t need it.

If you need one, I recommend a nice client to use on a pie: V2Raya

It supports SS, SSR, Trojan(Trojan-Go), and Pingtunnel protocols. After running up in the webpage management. If you have Docker installed, you can run with a command:

# run v2raya
docker run -d \
    --restart=always \
    --privileged \
    --network=host \
    --name v2raya \
        -v /lib/modules:/lib/modules \
    -v /etc/resolv.conf:/etc/resolv.conf \
    -v /etc/v2raya:/etc/v2raya \
    mzz2017/v2raya

If you need to use proxies on the command line, you can install Proxychains:

sudo apt install proxychains

After installation, configure it:

# vi /etc/proxychains. Conf socks4 127.0.0.1 20170

Zsh + Oh My Zsh + PowerLevel10K

Again, I’m a developer and I need a good command line tool. You can skip this step if you don’t need it.

  • ZSH is a terminal tool, similar to the built-in sh, bash
  • Oh My Zsh is a plugin that works with Zsh
  • PowerLevel10K is a topic of Oh My Zsh

Installation method:

1. ZSH:

sudo apt install zsh

After installing, you can use this command to modify it as your boot terminal

chsh -s $(which zsh)

You can then use this command to see if it works:

echo $0 # zsh

After installing it for the first time, the configuration option will pop up for you to customize your own habits. Press the Settings you like.

2. Oh My Zsh:

Installation is simple:

# curl installed sh -c "$(curl - fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" # or use wget installed sh -c "$(wget https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh -O -)"

Note: raw.githubusercontent.com is outside the wall, if you need a ladder, please bring your own.

3. Powerlevel10k:

This is a very <s> fancy </s> handsome theme, install command:

git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k # Git clone --depth=1 https://gitee.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k

Alter Zsh configuration file:

# vi ~/.zshrc
ZSH_THEME="powerlevel10k/powerlevel10k"

After loading, it needs to be loaded with fonts to display properly:

# Download fonts to current directory wget https://github.com/ryanoasis/nerd-fonts/raw/master/patched-fonts/Hack/Regular/complete/Hack%20Regular%20Nerd%20Font%20Co Mplete. Move the vera.ttf # Font to the system directory cp Hack/Regular/Nerd/Font \ Complete the vera.ttf/usr/share / / truetype fonts

You can then set it to the appropriate font in your own command line program. If not set, some characters may not be displayed. However, if you are using SSH remotely, you will need to install the fonts on your native machine.

After installing it for the first time, the configuration option will pop up for you to customize your own habits. Press the Settings you like.

When installed, the command line looks like this:

1.6. RDP

RDP is the kind of remote desktop that comes with Windows, and it’s a much better experience than VNC. So I’m going to choose this one. Installation is also simple:

sudo apt install xrdp

Then you can connect to the pie with an IP from somewhere else.

Windows: MSTSC (Microsoft Terminal Services Client)

You can download Microsoft Remote Desktop for Mac. If it is not available on the AppStore, you can download a Beta version of the Desktop for Mac.

Microsoft Remote Desktop for Mac is also used on the iPad

Application 2.

< / span > < / p > < p style=”transform: rotate(35deg); display: inline-block;” >:)</span>