[New] Things to do when you get a raspberry pie

Subtract 1

I was just sitting around looking at raspberry PI eating ashes and thinking about changing it to another system, but the damn Ubuntu Mate system just ate me!!

The thing is, like I said above, Raspberry PI’s been eating ashes for years, and I thought I’d get him a new system for a second chance.

However, after using Ubuntu Mate, the Gnome desktop was too stuck to be worth it. I thought I’d switch it back to raspberry PI. As a result, that card is obsolete 🙃

No matter what tools you use, all kinds of tools: low grid, mass production, official fixes, formatting, partitioning, command lines, dedicated disk management systems can’t be saved. The card is now read-only, and no changes can be made to it. Check bad road also all green healthy horse. But it couldn’t be saved…

The Hex tool was able to disable one of the two partitions, but couldn’t completely clean them.

(If anyone has encountered this situation know how to save welcome to advise)

Bought a new card ~ the system used this time is: 2021-05-07-raspios-Buster – armHF. img

Raspberry Pi 3 Model B Rev 1.2

This article is for those with a raspberry PI or Linux background, or read my old one, which describes in detail the things to do when you get a Raspberry PI

1. The system

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

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

1.1. Raspberry pi configuration

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

sudo raspi-config
Copy the code

After startup, enter the Raspberry PI Configuration to set the specific Settings. You can go through them one by one and choose the Settings you like.

Roughly need to be configured:

  • System: Wifi connection, system user and password
  • Display: Default resolution
  • Run the following command to enable SSH
  • Localization: language, time zone, keyboard, Wifi
  • Advanced: Expanded disc

1.2. Update Raspberry PI Configuration

My own operation habit is to set up and then update this tool, in case there is a problem even the basic configuration is not set, but also can not update, anyway the change is not big.

1.3. The File system expantion

This is the “advanced: Expansion disc” I mentioned in point 1. Because raspberry PI systems tend to have a lot of unused space after they’re burned, use this to make it all work. Be sure to reboot after this for it to take effect.

1.4. Add Vim and modify the source

Since the built-in VI in its system is incomplete and completely unavailable to me, I installed a normal Vim before changing the source and then modified its APT source. If you do not use Vim, you can skip this step.

sudo apt install vim
Copy the code

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

Since I’m using Buster, all I need to do is:

# edit '/etc/apt/sources.list' file, delete all contents of the original file and replace with the following contents:
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/ buster 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
Copy the code

Note that raspbian repeats twice at the end of the url. Raspbian’s repository contains other code besides the APT source. APT software sources are not in the root directory of the repository, but in the Raspbian/subdirectory.

In addition, you can use this command to check whether you are in Debian:

lsb_release -a
Copy the code

For example, I’ll display:

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

Look at the Description line and you know this is a Debian 10-Buster.

Be sure to update the software source list when you’re done:

sudo apt-get update
Copy the code

1.5. Docker

Because I am a developer and use Docker a lot, SO I installed it, if you don’t need to skip this step.

The simplest installation is as follows:

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

I’ll set it up after I run the command.

Or you can manually install it in another way, as explained on the Docker website.

1.6. Subtract 2

1.7. ZSH + Oh My Zsh + Powerlevel10k

Again, I’m a developer and NEED a good command line tool. Skip this step if you don’t want to.

  • ZSH is a terminal tool similar to sh, bash
  • Oh My Zsh is a plugin that works with Zsh
  • Powerlevel10k is a theme for Oh My Zsh

Installation method:

1. ZSH:

sudo apt install zsh
Copy the code

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

chsh -s $(which zsh)
Copy the code

You can then use this command to check whether it takes effect:

echo $0 # zsh
Copy the code

After installing it and using it for the first time, configuration options will pop up for you to customize your own habits, as you like.

2. Oh My Zsh:

Installation is simple:

# the curl is installed
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

Or install with wget
sh -c "$(wget https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh -O -)"
Copy the code

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

3. Powerlevel10k:

This is a fancy theme, install command:

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

# Use gitee.com if it's too difficult
git clone --depth=1 https://gitee.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
Copy the code

Modify the Zsh configuration file:

# vi ~/.zshrc
ZSH_THEME="powerlevel10k/powerlevel10k"
Copy the code

After installing it, you need to install fonts for it to display properly:

Download the font to the current directorywget https://github.com/ryanoasis/nerd-fonts/raw/master/patched-fonts/Hack/Regular/complete/Hack%20Regular%20Nerd%20Font%20Co mplete.ttfMove font to system directory
cp Hack\ Regular\ Nerd\ Font\ Complete.ttf /usr/share/fonts/truetype
Copy the code

Then you can set the corresponding font in your own command line program. Some characters may not be displayed without setting. However, if you are using remote SSH, you will need to install fonts on your machine.

After installing it and using it for the first time, configuration options will pop up for you to customize your own habits, as you like.

The command line will look like this:

1.6. RDP

Rdp is the remote desktop that comes with Windows, and the experience is much better than VNC. That’s why I chose this one. Installation is also simple:

sudo apt install xrdp
Copy the code

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

MSTSC (Microsoft Terminal Services Client)

You can download Microsoft Remote Desktop for Mac. If you can’t download it from Appstore, you can download a Beta version from the official website without affecting your use.

The same goes for Microsoft Remote Desktop for MAC on iPad

Application 2.

Imperceptibly this article writes this already very long, other content I see another one 🙂