02c58f39e59549b0c7754ac8389ed02eaeade457
Home.md
... | ... | @@ -2,10 +2,10 @@ |
2 | 2 | |
3 | 3 | This will contain various information that I have gathered or learned over time with mainly Linux topics. |
4 | 4 | |
5 | -- [systemd Tips & Tricks](/Linux/systemd Tips & Tricks) |
|
6 | -- [Ubuntu Notes](/Linux/Ubuntu Notes) |
|
7 | -- [Arch Notes](/Linux/Arch Notes) |
|
8 | -- [Wayland & X11 Notes](/Linux/Wayland & X11) |
|
9 | -- [nix Tips & Tricks](/Linux/nix Tips & Tricks) |
|
10 | -- [Pine64 Notes](/Linux/Pine64 Notes) |
|
5 | +- [systemd Tips & Tricks](/Linux/systemd-tips-and-tricks) |
|
6 | +- [Ubuntu Notes](/Linux/ubuntu-notes) |
|
7 | +- [Arch Notes](/Linux/arch-otes) |
|
8 | +- [Wayland & X11 Notes](/Linux/Wayland-and-X11) |
|
9 | +- [nix Tips & Tricks](/Linux/nix-tips-and-tricks) |
|
10 | +- [Pine64 Notes](/Linux/pine64-notes) |
|
11 | 11 | - [Devices](/Devices) |
Linux/Arch Notes.md
... | ... | @@ -1,50 +0,0 @@ |
1 | -# pacman |
|
2 | - |
|
3 | -| Commands | What it does | |
|
4 | -| :---------: | :----------------------------------: | |
|
5 | -| pacman -Syu | updates repos then upgrades packages | |
|
6 | - |
|
7 | -| Commands | What it does | |
|
8 | -| :--------------: | :-----------------------------------: | |
|
9 | -| pkgfile filename | files what package provides that file | |
|
10 | - |
|
11 | -# Building an AUR package |
|
12 | - |
|
13 | -## makepkg |
|
14 | - |
|
15 | -```bash |
|
16 | -makepkg -i system76-keyboard-configurator |
|
17 | -``` |
|
18 | - |
|
19 | -PKGBUILD file: [source](https://aur.archlinux.org/packages/system76-keyboard-configurator) |
|
20 | -``` |
|
21 | -# Maintainer: Aaron Honeycutt <aaron at system76 dot com> |
|
22 | -pkgname=system76-keyboard-configurator |
|
23 | -pkgver=1.3.12 |
|
24 | -pkgrel=1 |
|
25 | -pkgdesc="Configures keymap and backlight of System76 keyboards." |
|
26 | -arch=('x86_64' 'aarch64') |
|
27 | -url="https://github.com/pop-os/keyboard-configurator" |
|
28 | -license=('GPL3') |
|
29 | -depends=('gtk3' 'hidapi' 'xz') |
|
30 | -makedepends=('cargo' 'systemd') |
|
31 | -source=("keyboard-configurator-$pkgver.tar.gz::$url/archive/refs/tags/v$pkgver.tar.gz") |
|
32 | -sha256sums=('cc9af4537d9ff3284fa0dd7502d81dc237ae2683950a9b9ef8517b51581e2b66') |
|
33 | - |
|
34 | -prepare() { |
|
35 | - cd "keyboard-configurator-$pkgver" |
|
36 | - export RUSTUP_TOOLCHAIN=stable |
|
37 | - make vendor |
|
38 | -} |
|
39 | - |
|
40 | -build() { |
|
41 | - cd "keyboard-configurator-$pkgver" |
|
42 | - export RUSTUP_TOOLCHAIN=stable |
|
43 | - make VENDOR=1 prefix=/usr |
|
44 | -} |
|
45 | - |
|
46 | -package() { |
|
47 | - cd "keyboard-configurator-$pkgver" |
|
48 | - make prefix=/usr DESTDIR="$pkgdir/" install |
|
49 | -} |
|
50 | -``` |
Linux/Linux Notes.md
... | ... | @@ -1,8 +0,0 @@ |
1 | -# Linux kernel |
|
2 | - |
|
3 | -| Commands | What it does | |
|
4 | -|:--------:|:------------:| |
|
5 | -| sudo update-initramfs -c -k *kernelversion* | Generate a new initramfs image with version | |
|
6 | -| sudo kernelstub -a "maxcpus=2" | Support disabling cores in the BIOS | |
|
7 | -| sudo kernelstub -a "nvme_core.default_ps_max_latency_us=####" | [Change NVMe wake-up times](https://wiki.archlinux.org/title/Solid_state_drive/NVMe#Power_Saving_(APST)) | |
|
8 | -| sudo kernelstub -a "intel_idle.max_cstate=4" | [Change Intel C-State Level](https://www.kernel.org/doc/html/latest/admin-guide/pm/intel_idle.html) | |
|
... | ... | \ No newline at end of file |
Linux/Package Managers.md
... | ... | @@ -1,35 +0,0 @@ |
1 | -# Ubuntu/Pop |
|
2 | - |
|
3 | -## apt/dpkg |
|
4 | - |
|
5 | -| Commands | What it does | |
|
6 | -|:--------:|:------------:| |
|
7 | -| apt policy packagename | Package information | |
|
8 | -| apt-cache madison packagename | List available versions for a package | |
|
9 | -| sudo apt install packagename –dry-run | See what packages will be installed with the package | |
|
10 | -| apt policy packagename | Find version installed and available | |
|
11 | -| sudo dpkg --remove --force-remove-reinstreq package_name | Remove broken package | |
|
12 | -| sudo apt-mark hold packagename | Hold a package to the current version | |
|
13 | -| dpkg --list | grep linux-image | List all installed kernels | |
|
14 | -| apt list --installed | grep packagename | Searches that package if it was installed using apt | |
|
15 | - |
|
16 | -# Arch |
|
17 | - |
|
18 | -## pacman |
|
19 | - |
|
20 | -| Commands | What it does | |
|
21 | -|:--------:|:------------:| |
|
22 | -| pacman -Syu | updates repos then upgrades packages | |
|
23 | - |
|
24 | -| Commands | What it does | |
|
25 | -|:--------:|:------------:| |
|
26 | -| pkgfile filename | files what package provides that file | |
|
27 | - |
|
28 | -# [flatpak](https://docs.flatpak.org/en/latest/using-flatpak.html) |
|
29 | - |
|
30 | -| Commands | What it does | |
|
31 | -|:--------:|:------------:| |
|
32 | -| flatpak update | Update flatpak packages | |
|
33 | -| flatpak list | Show the installed flatpak packages | |
|
34 | -| flatpak search | Search flatpak packages from sources | |
|
35 | -| flatpak remotes | List Flatpak remotes (other servers) | |
|
... | ... | \ No newline at end of file |
Linux/Pine64 Notes.md
... | ... | @@ -1,96 +0,0 @@ |
1 | -# PinePhone |
|
2 | - |
|
3 | -## Terms |
|
4 | - |
|
5 | -- [JumpDrive](https://github.com/dreemurrs-embedded/Jumpdrive) |
|
6 | - |
|
7 | -JumpDrive is software used to boot the PinePhone so that the onboard eMMC can be written to for replacing the currently installed OS. |
|
8 | - |
|
9 | -- [eMMC](https://en.wikipedia.org/wiki/MultiMediaCard#eMMC) |
|
10 | - |
|
11 | -This is the onboard storage used for most Smartphones and Tablets (like the PinePhone and the PineTab) |
|
12 | - |
|
13 | -- [MMC (microSD/SD)](https://en.wikipedia.org/wiki/SD_card) |
|
14 | - |
|
15 | -This is a storage device used to store data and in this case an OS. |
|
16 | - |
|
17 | -> *NOTE:* eMMC storage will be noticeably faster when compared to a microSD card. |
|
18 | - |
|
19 | -### Needed Items |
|
20 | - |
|
21 | -- PinePhone |
|
22 | -- 1x 4GB microSD card to be the JumpDrive |
|
23 | -- 1x 32GB or larger microSD card for the OS |
|
24 | - |
|
25 | -The 3rd item is useful for trying different OSes as you just need to write the OS, swap out the card then power on the PinePhone. If you want to try more then two OSes (the one on the microSD card and on the eMMC) at a time. |
|
26 | - |
|
27 | -#### Creating the JumpDrive |
|
28 | - |
|
29 | -1. Connect the microSD card to your system. |
|
30 | -2. Download the latest release of JumpDrive for the PinePhone (it will be labeled pine64-pinephone.img.xz) from their [releases page](https://github.com/dreemurrs-embedded/Jumpdrive/releases). |
|
31 | -3. Open the Disks application then left-click the microSD card from the left side list |
|
32 | -4. Left-click on the three dot menu in the top right of the Disks application |
|
33 | -5. Left-click the "Restore Disk Image..." option from that menu |
|
34 | -6. Left-click the pine64-pinephone.img.xz image from your Downloads folder |
|
35 | -7. Contine though the prompts and let the process complete |
|
36 | - |
|
37 | -#### Booting from the JumpDrive |
|
38 | - |
|
39 | -1. Plug the microSD card into the PinePhone's microSD card slot |
|
40 | -2. Power on the PinePhone (connecting the power cable should do this as well if you don't want to put the device together) |
|
41 | - |
|
42 | -#### Flashing the eMMC |
|
43 | - |
|
44 | -1. Connect the PinePhone to your system |
|
45 | -2. Once booted to the JumpDrive you should see the PinePhone's eMMC in the Disks application. |
|
46 | -3. Follow the same steps from creating the JumpDrive but instead of selecting the microSD card left-click the eMMC and use the pinephone.img.xz file of the OS that you want to install. |
|
47 | - |
|
48 | -This [page](https://wiki.pine64.org/wiki/PinePhone_Software_Releases) is a common place to find PinePhone OSes. For example if I wanted Arch with Phosh for the original PinePhone I would download the "archlinux-pinephone-phosh-20211212.img.xz" image from this [page](https://github.com/dreemurrs-embedded/Pine64-Arch/releases). |
|
49 | - |
|
50 | ---- |
|
51 | - |
|
52 | -# Pinebook Pro |
|
53 | - |
|
54 | -## Installing Armian 22.08 |
|
55 | - |
|
56 | -### Installing to microSD card |
|
57 | - |
|
58 | -1. Download the image file from [here](https://www.armbian.com/pinebook-pro/). |
|
59 | -2. You can use the Disks application if you are on GNOME or similar desktops similar to the steps in this System76 [article](https://support.system76.com/articles/live-disk#making-the-bootable-drive). |
|
60 | - |
|
61 | -### Booting from microSD card |
|
62 | - |
|
63 | -1. Download the image file again to the microSD card while booted from it. |
|
64 | -2. Now write the image to the eMMC using this command: |
|
65 | - |
|
66 | -``` |
|
67 | -xzcat Armbian_22.08.1_Pinebook-pro_jammy_current_5.15.63.img.xz | sudo dd of=/dev/mmcblk2 bs=4M status=progress |
|
68 | -``` |
|
69 | - |
|
70 | -### Mount the eMMC install |
|
71 | - |
|
72 | -1. Run this command: |
|
73 | - |
|
74 | -``` |
|
75 | -sudo mount /dev/mmcblk2p1/ |
|
76 | -``` |
|
77 | - |
|
78 | -From there download this replacement file using this command: |
|
79 | - |
|
80 | -``` |
|
81 | -wget http.kali.org/dists/kali-dev/main/installer-arm64/current/images/device-tree/rockchip/rk3399-pinebook-pro.dtb |
|
82 | -``` |
|
83 | - |
|
84 | -Then replace it: |
|
85 | - |
|
86 | -``` |
|
87 | -sudo mv rk3399-pinebook-pro.dtb /mnt/boot/dtb/rockchip/ |
|
88 | -``` |
|
89 | - |
|
90 | -Now shutdown to remove the microSD card and reboot into the eMMC: |
|
91 | - |
|
92 | -``` |
|
93 | -sudo shutdown now |
|
94 | -``` |
|
95 | - |
|
96 | -Credits: [https://forum.pine64.org/showthread.php?tid=17215](https://forum.pine64.org/showthread.php?tid=17215) |
|
... | ... | \ No newline at end of file |
Linux/Ubuntu Notes.md
... | ... | @@ -1,73 +0,0 @@ |
1 | -# GRUB |
|
2 | - |
|
3 | -| Commands | What it does | |
|
4 | -|:--------:|:------------:| |
|
5 | -| sed -i 's/^GRUB_CMDLINE_LINUX_DEFAULT="/&option /' /etc/default/grub | adds kernel option to GRUB file | |
|
6 | - |
|
7 | -Replace &option with the kernel param like quiet or similar. |
|
8 | - |
|
9 | -> *NOTE:* you will need to run this command when making changes to GRUB's file before rebooting: |
|
10 | - |
|
11 | -```bash |
|
12 | -sudo update-grub |
|
13 | -``` |
|
14 | - |
|
15 | -Editing the /etc/default/grub file and changing the GRUB_DEFAULT line to match this will boot the previous kernel as the default: |
|
16 | - |
|
17 | -GRUB_DEFAULT="1>3" |
|
18 | - |
|
19 | -Run the update-grub command to save that change. |
|
20 | - |
|
21 | -## fwupd |
|
22 | - |
|
23 | -| Commands | What it does | |
|
24 | -|:--------:|:------------:| |
|
25 | -| fwupdmgr get-devices | List devices supported by fwupd | |
|
26 | -| fwupdmgr get-updates | Perform updates to devices supported by fwupd | |
|
27 | -https://wiki.archlinux.org/title/fwupd |
|
28 | - |
|
29 | -## Ubuntu/Pop |
|
30 | - |
|
31 | -### apt/dpkg |
|
32 | - |
|
33 | -| Commands | What it does | |
|
34 | -| :------------------------------------------------------: | :--------------------------------------------------: | |
|
35 | -| apt policy packagename | Package information | |
|
36 | -| apt-cache madison packagename | List available versions for a package | |
|
37 | -| sudo apt install packagename –dry-run | See what packages will be installed with the package | |
|
38 | -| apt policy packagename | Find version installed and available | |
|
39 | -| sudo dpkg --remove --force-remove-reinstreq package_name | Remove broken package | |
|
40 | -| sudo apt-mark hold packagename | Hold a package to the current version | |
|
41 | -| dpkg --list | grep linux-image | |
|
42 | -| apt list --installed | grep packagename | |
|
43 | -## kernel commands |
|
44 | - |
|
45 | -| Commands | What it does | |
|
46 | -| ------------------------------------------- | ------------------------------------------- | |
|
47 | -| sudo update-initramfs -c -k *kernelversion* | Generate a new initramfs image with version | |
|
48 | - |
|
49 | -# [flatpak](https://docs.flatpak.org/en/latest/using-flatpak.html) |
|
50 | - |
|
51 | -| Commands | What it does | |
|
52 | -|:--------:|:------------:| |
|
53 | -| flatpak update | Update flatpak packages | |
|
54 | -| flatpak list | Show the installed flatpak packages | |
|
55 | -| flatpak search | Search flatpak packages from sources | |
|
56 | -| flatpak remotes | List Flatpak remotes (other servers) | |
|
57 | - |
|
58 | -# Plasma |
|
59 | - |
|
60 | -| Commands | What it does | |
|
61 | -|:--------:|:------------:| |
|
62 | -| kioclient exec path/to/desktop/file | Runs the .desktop file | |
|
63 | - |
|
64 | -# GNOME |
|
65 | - |
|
66 | -## GSettings |
|
67 | - |
|
68 | -| Commands | What it does | |
|
69 | -| :------: | :----------: | |
|
70 | -| gsettings set org.gnome.desktop.interface scaling-factor 2 | Change scaling for the UI | |
|
71 | -| gsettings set com.ubuntu.user-interface.desktop cursor-size 48 | Enlarge cursor | |
|
72 | -| gsettings set org.gnome.desktop.background picture-uri 'file://PathToImage' | Change wallpaper | |
|
73 | -| gsettings set org.gnome.desktop.wm.preferences button-layout "appmenu:minimize,maximize,close" | Enable Minimize and Maximize buttons | |
Linux/Wayland & X11.md
... | ... | @@ -1,11 +0,0 @@ |
1 | -# Both |
|
2 | - |
|
3 | -Use this command to confirm if you are using X11 or Wayland: |
|
4 | - |
|
5 | -```bash |
|
6 | -echo $XDG_SESSION_TYPE |
|
7 | -``` |
|
8 | -# Xorg (X11) |
|
9 | -| Commands | What it does | |
|
10 | -| :--------: | :-------------------------------------------------------------------------------------------------: | |
|
11 | -| xset -dpms | [Disable Monitor power saving](https://wiki.archlinux.org/title/Display_Power_Management_Signaling) | |
Linux/Wayland-and-X11.md
... | ... | @@ -0,0 +1,11 @@ |
1 | +# Both |
|
2 | + |
|
3 | +Use this command to confirm if you are using X11 or Wayland: |
|
4 | + |
|
5 | +```bash |
|
6 | +echo $XDG_SESSION_TYPE |
|
7 | +``` |
|
8 | +# Xorg (X11) |
|
9 | +| Commands | What it does | |
|
10 | +| :--------: | :-------------------------------------------------------------------------------------------------: | |
|
11 | +| xset -dpms | [Disable Monitor power saving](https://wiki.archlinux.org/title/Display_Power_Management_Signaling) | |
Linux/arch-notes.md
... | ... | @@ -0,0 +1,50 @@ |
1 | +# pacman |
|
2 | + |
|
3 | +| Commands | What it does | |
|
4 | +| :---------: | :----------------------------------: | |
|
5 | +| pacman -Syu | updates repos then upgrades packages | |
|
6 | + |
|
7 | +| Commands | What it does | |
|
8 | +| :--------------: | :-----------------------------------: | |
|
9 | +| pkgfile filename | files what package provides that file | |
|
10 | + |
|
11 | +# Building an AUR package |
|
12 | + |
|
13 | +## makepkg |
|
14 | + |
|
15 | +```bash |
|
16 | +makepkg -i system76-keyboard-configurator |
|
17 | +``` |
|
18 | + |
|
19 | +PKGBUILD file: [source](https://aur.archlinux.org/packages/system76-keyboard-configurator) |
|
20 | +``` |
|
21 | +# Maintainer: Aaron Honeycutt <aaron at system76 dot com> |
|
22 | +pkgname=system76-keyboard-configurator |
|
23 | +pkgver=1.3.12 |
|
24 | +pkgrel=1 |
|
25 | +pkgdesc="Configures keymap and backlight of System76 keyboards." |
|
26 | +arch=('x86_64' 'aarch64') |
|
27 | +url="https://github.com/pop-os/keyboard-configurator" |
|
28 | +license=('GPL3') |
|
29 | +depends=('gtk3' 'hidapi' 'xz') |
|
30 | +makedepends=('cargo' 'systemd') |
|
31 | +source=("keyboard-configurator-$pkgver.tar.gz::$url/archive/refs/tags/v$pkgver.tar.gz") |
|
32 | +sha256sums=('cc9af4537d9ff3284fa0dd7502d81dc237ae2683950a9b9ef8517b51581e2b66') |
|
33 | + |
|
34 | +prepare() { |
|
35 | + cd "keyboard-configurator-$pkgver" |
|
36 | + export RUSTUP_TOOLCHAIN=stable |
|
37 | + make vendor |
|
38 | +} |
|
39 | + |
|
40 | +build() { |
|
41 | + cd "keyboard-configurator-$pkgver" |
|
42 | + export RUSTUP_TOOLCHAIN=stable |
|
43 | + make VENDOR=1 prefix=/usr |
|
44 | +} |
|
45 | + |
|
46 | +package() { |
|
47 | + cd "keyboard-configurator-$pkgver" |
|
48 | + make prefix=/usr DESTDIR="$pkgdir/" install |
|
49 | +} |
|
50 | +``` |
Linux/linux-notes.md
... | ... | @@ -0,0 +1,8 @@ |
1 | +# Linux kernel |
|
2 | + |
|
3 | +| Commands | What it does | |
|
4 | +|:--------:|:------------:| |
|
5 | +| sudo update-initramfs -c -k *kernelversion* | Generate a new initramfs image with version | |
|
6 | +| sudo kernelstub -a "maxcpus=2" | Support disabling cores in the BIOS | |
|
7 | +| sudo kernelstub -a "nvme_core.default_ps_max_latency_us=####" | [Change NVMe wake-up times](https://wiki.archlinux.org/title/Solid_state_drive/NVMe#Power_Saving_(APST)) | |
|
8 | +| sudo kernelstub -a "intel_idle.max_cstate=4" | [Change Intel C-State Level](https://www.kernel.org/doc/html/latest/admin-guide/pm/intel_idle.html) | |
|
... | ... | \ No newline at end of file |
Linux/nix Tips & Tricks.md
... | ... | @@ -1,35 +0,0 @@ |
1 | -# Nix Package Manager |
|
2 | - |
|
3 | -## Managing packages |
|
4 | - |
|
5 | -```bash |
|
6 | -nix-env -iA nixpkgs.<packagename> |
|
7 | -``` |
|
8 | - |
|
9 | -# NixOS |
|
10 | - |
|
11 | -## Updating a Flake based system |
|
12 | - |
|
13 | -```bash |
|
14 | -sudo nix update --flake /etc/nixos |
|
15 | -sudo nixos-rebuild switch |
|
16 | -``` |
|
17 | - |
|
18 | -## Updating a non-Flake based system |
|
19 | - |
|
20 | -```bash |
|
21 | -sudo nixos-rebuild switch |
|
22 | -``` |
|
23 | - |
|
24 | -You can use `boot` instead of `switch` for the system to boot into the new generation on reboot instead. |
|
25 | - |
|
26 | -# Contributing to nixpkgs |
|
27 | - |
|
28 | -## Updating packages that you maintain |
|
29 | - |
|
30 | -```bash |
|
31 | -git checkout -b bump-mypkg |
|
32 | -nix-shell -p nix-update --run 'nix-update <pkg> --commit' |
|
33 | -nix-build -A <pkg> # ensure it builds |
|
34 | -git push <fork> bump-mypkg |
|
35 | -``` |
|
... | ... | \ No newline at end of file |
Linux/nix-tips-and-tricks.md
... | ... | @@ -0,0 +1,35 @@ |
1 | +# Nix Package Manager |
|
2 | + |
|
3 | +## Managing packages |
|
4 | + |
|
5 | +```bash |
|
6 | +nix-env -iA nixpkgs.<packagename> |
|
7 | +``` |
|
8 | + |
|
9 | +# NixOS |
|
10 | + |
|
11 | +## Updating a Flake based system |
|
12 | + |
|
13 | +```bash |
|
14 | +sudo nix update --flake /etc/nixos |
|
15 | +sudo nixos-rebuild switch |
|
16 | +``` |
|
17 | + |
|
18 | +## Updating a non-Flake based system |
|
19 | + |
|
20 | +```bash |
|
21 | +sudo nixos-rebuild switch |
|
22 | +``` |
|
23 | + |
|
24 | +You can use `boot` instead of `switch` for the system to boot into the new generation on reboot instead. |
|
25 | + |
|
26 | +# Contributing to nixpkgs |
|
27 | + |
|
28 | +## Updating packages that you maintain |
|
29 | + |
|
30 | +```bash |
|
31 | +git checkout -b bump-mypkg |
|
32 | +nix-shell -p nix-update --run 'nix-update <pkg> --commit' |
|
33 | +nix-build -A <pkg> # ensure it builds |
|
34 | +git push <fork> bump-mypkg |
|
35 | +``` |
|
... | ... | \ No newline at end of file |
Linux/package-managers.md
... | ... | @@ -0,0 +1,35 @@ |
1 | +# Ubuntu/Pop |
|
2 | + |
|
3 | +## apt/dpkg |
|
4 | + |
|
5 | +| Commands | What it does | |
|
6 | +|:--------:|:------------:| |
|
7 | +| apt policy packagename | Package information | |
|
8 | +| apt-cache madison packagename | List available versions for a package | |
|
9 | +| sudo apt install packagename –dry-run | See what packages will be installed with the package | |
|
10 | +| apt policy packagename | Find version installed and available | |
|
11 | +| sudo dpkg --remove --force-remove-reinstreq package_name | Remove broken package | |
|
12 | +| sudo apt-mark hold packagename | Hold a package to the current version | |
|
13 | +| dpkg --list | grep linux-image | List all installed kernels | |
|
14 | +| apt list --installed | grep packagename | Searches that package if it was installed using apt | |
|
15 | + |
|
16 | +# Arch |
|
17 | + |
|
18 | +## pacman |
|
19 | + |
|
20 | +| Commands | What it does | |
|
21 | +|:--------:|:------------:| |
|
22 | +| pacman -Syu | updates repos then upgrades packages | |
|
23 | + |
|
24 | +| Commands | What it does | |
|
25 | +|:--------:|:------------:| |
|
26 | +| pkgfile filename | files what package provides that file | |
|
27 | + |
|
28 | +# [flatpak](https://docs.flatpak.org/en/latest/using-flatpak.html) |
|
29 | + |
|
30 | +| Commands | What it does | |
|
31 | +|:--------:|:------------:| |
|
32 | +| flatpak update | Update flatpak packages | |
|
33 | +| flatpak list | Show the installed flatpak packages | |
|
34 | +| flatpak search | Search flatpak packages from sources | |
|
35 | +| flatpak remotes | List Flatpak remotes (other servers) | |
|
... | ... | \ No newline at end of file |
Linux/pine64-notes.md
... | ... | @@ -0,0 +1,96 @@ |
1 | +# PinePhone |
|
2 | + |
|
3 | +## Terms |
|
4 | + |
|
5 | +- [JumpDrive](https://github.com/dreemurrs-embedded/Jumpdrive) |
|
6 | + |
|
7 | +JumpDrive is software used to boot the PinePhone so that the onboard eMMC can be written to for replacing the currently installed OS. |
|
8 | + |
|
9 | +- [eMMC](https://en.wikipedia.org/wiki/MultiMediaCard#eMMC) |
|
10 | + |
|
11 | +This is the onboard storage used for most Smartphones and Tablets (like the PinePhone and the PineTab) |
|
12 | + |
|
13 | +- [MMC (microSD/SD)](https://en.wikipedia.org/wiki/SD_card) |
|
14 | + |
|
15 | +This is a storage device used to store data and in this case an OS. |
|
16 | + |
|
17 | +<<Note("eMMC storage will be noticeably faster when compared to a microSD card.")>> |
|
18 | + |
|
19 | +### Needed Items |
|
20 | + |
|
21 | +- PinePhone |
|
22 | +- 1x 4GB microSD card to be the JumpDrive |
|
23 | +- 1x 32GB or larger microSD card for the OS |
|
24 | + |
|
25 | +The 3rd item is useful for trying different OSes as you just need to write the OS, swap out the card then power on the PinePhone. If you want to try more then two OSes (the one on the microSD card and on the eMMC) at a time. |
|
26 | + |
|
27 | +#### Creating the JumpDrive |
|
28 | + |
|
29 | +1. Connect the microSD card to your system. |
|
30 | +2. Download the latest release of JumpDrive for the PinePhone (it will be labeled pine64-pinephone.img.xz) from their [releases page](https://github.com/dreemurrs-embedded/Jumpdrive/releases). |
|
31 | +3. Open the Disks application then left-click the microSD card from the left side list |
|
32 | +4. Left-click on the three dot menu in the top right of the Disks application |
|
33 | +5. Left-click the "Restore Disk Image..." option from that menu |
|
34 | +6. Left-click the pine64-pinephone.img.xz image from your Downloads folder |
|
35 | +7. Contine though the prompts and let the process complete |
|
36 | + |
|
37 | +#### Booting from the JumpDrive |
|
38 | + |
|
39 | +1. Plug the microSD card into the PinePhone's microSD card slot |
|
40 | +2. Power on the PinePhone (connecting the power cable should do this as well if you don't want to put the device together) |
|
41 | + |
|
42 | +#### Flashing the eMMC |
|
43 | + |
|
44 | +1. Connect the PinePhone to your system |
|
45 | +2. Once booted to the JumpDrive you should see the PinePhone's eMMC in the Disks application. |
|
46 | +3. Follow the same steps from creating the JumpDrive but instead of selecting the microSD card left-click the eMMC and use the pinephone.img.xz file of the OS that you want to install. |
|
47 | + |
|
48 | +This [page](https://wiki.pine64.org/wiki/PinePhone_Software_Releases) is a common place to find PinePhone OSes. For example if I wanted Arch with Phosh for the original PinePhone I would download the "archlinux-pinephone-phosh-20211212.img.xz" image from this [page](https://github.com/dreemurrs-embedded/Pine64-Arch/releases). |
|
49 | + |
|
50 | +--- |
|
51 | + |
|
52 | +# Pinebook Pro |
|
53 | + |
|
54 | +## Installing Armian 22.08 |
|
55 | + |
|
56 | +### Installing to microSD card |
|
57 | + |
|
58 | +1. Download the image file from [here](https://www.armbian.com/pinebook-pro/). |
|
59 | +2. You can use the Disks application if you are on GNOME or similar desktops similar to the steps in this System76 [article](https://support.system76.com/articles/live-disk#making-the-bootable-drive). |
|
60 | + |
|
61 | +### Booting from microSD card |
|
62 | + |
|
63 | +1. Download the image file again to the microSD card while booted from it. |
|
64 | +2. Now write the image to the eMMC using this command: |
|
65 | + |
|
66 | +``` |
|
67 | +xzcat Armbian_22.08.1_Pinebook-pro_jammy_current_5.15.63.img.xz | sudo dd of=/dev/mmcblk2 bs=4M status=progress |
|
68 | +``` |
|
69 | + |
|
70 | +### Mount the eMMC install |
|
71 | + |
|
72 | +1. Run this command: |
|
73 | + |
|
74 | +``` |
|
75 | +sudo mount /dev/mmcblk2p1/ |
|
76 | +``` |
|
77 | + |
|
78 | +From there download this replacement file using this command: |
|
79 | + |
|
80 | +``` |
|
81 | +wget http.kali.org/dists/kali-dev/main/installer-arm64/current/images/device-tree/rockchip/rk3399-pinebook-pro.dtb |
|
82 | +``` |
|
83 | + |
|
84 | +Then replace it: |
|
85 | + |
|
86 | +``` |
|
87 | +sudo mv rk3399-pinebook-pro.dtb /mnt/boot/dtb/rockchip/ |
|
88 | +``` |
|
89 | + |
|
90 | +Now shutdown to remove the microSD card and reboot into the eMMC: |
|
91 | + |
|
92 | +``` |
|
93 | +sudo shutdown now |
|
94 | +``` |
|
95 | + |
|
96 | +Credits: [https://forum.pine64.org/showthread.php?tid=17215](https://forum.pine64.org/showthread.php?tid=17215) |
Linux/systemd Tips & Tricks.md
... | ... | @@ -1,105 +0,0 @@ |
1 | -# systemd general commands |
|
2 | - |
|
3 | -| Commands | What it does | |
|
4 | -|:--------:|:------------:| |
|
5 | -| systemctl --failed | List failed systemd units | |
|
6 | -| systemctl --failes --all | List all failed services in systemd | |
|
7 | -| systemctl --user -t target | See what systemd targets are running | |
|
8 | -| systemctl --user list-dependencies default.target | See if the default target wants a user service | |
|
9 | -| systemctl enable multi-user.target --force | Make multi-user target available in a normally graphical OS | |
|
10 | -| systemctl get-default | Get current runlevel | |
|
11 | -| systemctl isolate graphical.target | Switch to gui mode, runlevel 5 | |
|
12 | -| systemctl isolate multi-user.target | Switch to server mode (runlevel 3), no gui | |
|
13 | -| bluetooth.service | Show dependencies systemctl list-dependencies | |
|
14 | -| systemctl list-timers -a | List all timers | |
|
15 | -| systemctl list-unit-files | Shows all services, sockets, timers, and sockets | |
|
16 | -| systemctl list-unit-files --type=service | List systemd service files | |
|
17 | -| systemctl list-units | Show running units | |
|
18 | -| systemctl list-units --type=service --state=active | systemd services currently active | |
|
19 | -| systemctl list-units --type=service --state=running | systemd services currently active and running | |
|
20 | -| systemctl set-default graphical.target | Change the default systemd startup mode to a gui | |
|
21 | -| systemctl set-default multi-user.target | Change the default systemd startup mode to a terminal only | |
|
22 | -| systemctl suspend | Suspend computer | |
|
23 | -| systemctl hibernate | Hibernate computer | |
|
24 | -| systemctl reboot --boot-loader-entry=Pop_OS-oldkern.conf | Boots to the oldkern, can be changed to match another entry like Windows or Recovery | |
|
25 | -| systemctl reboot --boot-loader-entry=help | List all boot entries for systemd-boot | |
|
26 | -| systemctl reboot --firmware-setup | Restarts the system into BIOS | |
|
27 | -| systemctl restart name.service | Restart a service like bluetooth.service or apache2.service | |
|
28 | -| systemctl status name.service | See what is going on with a service | |
|
29 | -| systemctl status --no-pager | Show tree of processes | |
|
30 | -| systemd-analyze plot > boot_analysis.svg | Create a graphic of the boot time and process | |
|
31 | -| systemd-resolve –status | List network info like DNS Servers | |
|
32 | - |
|
33 | -## systemd v251+ (in Ubuntu 22.10+) |
|
34 | - |
|
35 | -| Commands | What it does | |
|
36 | -|:--------:|:------------:| |
|
37 | -| bootctl set-timeout TIMEOUT | Sets the boot loader menu timeout in seconds | |
|
38 | -| bootctl set-timeout-oneshot TIMEOUT | Set the boot loader menu timeout only for the next boot | |
|
39 | - |
|
40 | -## systemd v249 (Pop!_OS 22.04/Ubuntu 22.04) |
|
41 | - |
|
42 | -| Commands | What it does | |
|
43 | -|:--------:|:------------:| |
|
44 | -| bootctl set-default ID | Sets the new boot device/target | |
|
45 | -| bootctl set-oneshot ID | Sets the new boot device/target for only the next boot | |
|
46 | - |
|
47 | -# systemd-boot |
|
48 | - |
|
49 | -Systemd-boot started with just support for UEFI which means the code base is much smaller when compared to GRUB which has a ton of code to work with different types of drives that have been released in the last decade. Pop!_OS has been using it since the 18.04 LTS release and I have been using it as my go to boot manager ever since. |
|
50 | - |
|
51 | -## efibootmgr |
|
52 | - |
|
53 | -| Commands | What it does | |
|
54 | -|:--------:|:------------:| |
|
55 | -| efibootmgr | List boot entries | |
|
56 | -| sudo efibootmgr -n #### | Sets that boot entry for the next boot only | |
|
57 | -| sudo efibootmgr -N #### | Deletes the boot next | |
|
58 | -| sudo efibootmgr --timeout=5 | Add a 5 second timeout to boot | |
|
59 | -| sudo efibootmgr -b #### -B | Remove boot entry matching the #### | |
|
60 | - |
|
61 | -This command allows us to edit the EFI variables though EFISTUB, the [Arch Wiki](https://wiki.archlinux.org/title/EFISTUB#Using_UEFI_directly) has a really good selection about using `efibootmgr`. Here is my output as an example since I will be using the output in the next section: |
|
62 | - |
|
63 | -``` |
|
64 | -BootNext: 0001 |
|
65 | -BootCurrent: 0001 |
|
66 | -Timeout: 2 seconds |
|
67 | -BootOrder: 0001,000A,0002,0006,0000 |
|
68 | -Boot0000* UiApp |
|
69 | -Boot0001* Pop!_OS 22.04 LTS |
|
70 | -Boot0002* WDC WDS120G2G0B-00EPW0 |
|
71 | -Boot0006* WDC WDS100T2B0C-00PXH0 |
|
72 | -Boot000A* Linux Boot Manager |
|
73 | -``` |
|
74 | - |
|
75 | -Now you may not have the "BootNext:" option if you haven't used `efibootmgr` before. |
|
76 | - |
|
77 | -## Desktop files |
|
78 | - |
|
79 | -You can make your own desktop file and for system-wide you would put them in `/usr/share/applications/` but if you want them just for your user you can use `~/.local/share/applications/`. We can make .desktop files for these boot entries to set them as the next boot target but once you reboot again it reverts to using "BootOrder" order instead. |
|
80 | - |
|
81 | -This is my file for booting Arch on the next reboot: |
|
82 | - |
|
83 | -``` |
|
84 | -[Desktop Entry] |
|
85 | -Encoding=UTF-8 |
|
86 | -Version=1.0 |
|
87 | -Type=Application |
|
88 | -Terminal=false |
|
89 | -Exec=sh -c "pkexec efibootmgr -n 000A" |
|
90 | -Name=Boot to Arch |
|
91 | -Icon=/home/aaronh/Documents/archlinux-icon.svg |
|
92 | -``` |
|
93 | - |
|
94 | -and this is my file for booting Pop!_OS on the next boot: |
|
95 | - |
|
96 | -``` |
|
97 | -[Desktop Entry] |
|
98 | -Encoding=UTF-8 |
|
99 | -Version=1.0 |
|
100 | -Type=Application |
|
101 | -Terminal=false |
|
102 | -Exec=sh -c "pkexec efibootmgr -n 0001" |
|
103 | -Name=Boot to Pop!_OS |
|
104 | -Icon=/home/aaronh/Documents/pop_icon.svg |
|
105 | -``` |
|
... | ... | \ No newline at end of file |
Linux/systemd-tips-and-tricks.md
... | ... | @@ -0,0 +1,105 @@ |
1 | +# systemd general commands |
|
2 | + |
|
3 | +| Commands | What it does | |
|
4 | +|:--------:|:------------:| |
|
5 | +| systemctl --failed | List failed systemd units | |
|
6 | +| systemctl --failes --all | List all failed services in systemd | |
|
7 | +| systemctl --user -t target | See what systemd targets are running | |
|
8 | +| systemctl --user list-dependencies default.target | See if the default target wants a user service | |
|
9 | +| systemctl enable multi-user.target --force | Make multi-user target available in a normally graphical OS | |
|
10 | +| systemctl get-default | Get current runlevel | |
|
11 | +| systemctl isolate graphical.target | Switch to gui mode, runlevel 5 | |
|
12 | +| systemctl isolate multi-user.target | Switch to server mode (runlevel 3), no gui | |
|
13 | +| bluetooth.service | Show dependencies systemctl list-dependencies | |
|
14 | +| systemctl list-timers -a | List all timers | |
|
15 | +| systemctl list-unit-files | Shows all services, sockets, timers, and sockets | |
|
16 | +| systemctl list-unit-files --type=service | List systemd service files | |
|
17 | +| systemctl list-units | Show running units | |
|
18 | +| systemctl list-units --type=service --state=active | systemd services currently active | |
|
19 | +| systemctl list-units --type=service --state=running | systemd services currently active and running | |
|
20 | +| systemctl set-default graphical.target | Change the default systemd startup mode to a gui | |
|
21 | +| systemctl set-default multi-user.target | Change the default systemd startup mode to a terminal only | |
|
22 | +| systemctl suspend | Suspend computer | |
|
23 | +| systemctl hibernate | Hibernate computer | |
|
24 | +| systemctl reboot --boot-loader-entry=Pop_OS-oldkern.conf | Boots to the oldkern, can be changed to match another entry like Windows or Recovery | |
|
25 | +| systemctl reboot --boot-loader-entry=help | List all boot entries for systemd-boot | |
|
26 | +| systemctl reboot --firmware-setup | Restarts the system into BIOS | |
|
27 | +| systemctl restart name.service | Restart a service like bluetooth.service or apache2.service | |
|
28 | +| systemctl status name.service | See what is going on with a service | |
|
29 | +| systemctl status --no-pager | Show tree of processes | |
|
30 | +| systemd-analyze plot > boot_analysis.svg | Create a graphic of the boot time and process | |
|
31 | +| systemd-resolve –status | List network info like DNS Servers | |
|
32 | + |
|
33 | +## systemd v251+ (in Ubuntu 22.10+) |
|
34 | + |
|
35 | +| Commands | What it does | |
|
36 | +|:--------:|:------------:| |
|
37 | +| bootctl set-timeout TIMEOUT | Sets the boot loader menu timeout in seconds | |
|
38 | +| bootctl set-timeout-oneshot TIMEOUT | Set the boot loader menu timeout only for the next boot | |
|
39 | + |
|
40 | +## systemd v249 (Pop!_OS 22.04/Ubuntu 22.04) |
|
41 | + |
|
42 | +| Commands | What it does | |
|
43 | +|:--------:|:------------:| |
|
44 | +| bootctl set-default ID | Sets the new boot device/target | |
|
45 | +| bootctl set-oneshot ID | Sets the new boot device/target for only the next boot | |
|
46 | + |
|
47 | +# systemd-boot |
|
48 | + |
|
49 | +Systemd-boot started with just support for UEFI which means the code base is much smaller when compared to GRUB which has a ton of code to work with different types of drives that have been released in the last decade. Pop!_OS has been using it since the 18.04 LTS release and I have been using it as my go to boot manager ever since. |
|
50 | + |
|
51 | +## efibootmgr |
|
52 | + |
|
53 | +| Commands | What it does | |
|
54 | +|:--------:|:------------:| |
|
55 | +| efibootmgr | List boot entries | |
|
56 | +| sudo efibootmgr -n #### | Sets that boot entry for the next boot only | |
|
57 | +| sudo efibootmgr -N #### | Deletes the boot next | |
|
58 | +| sudo efibootmgr --timeout=5 | Add a 5 second timeout to boot | |
|
59 | +| sudo efibootmgr -b #### -B | Remove boot entry matching the #### | |
|
60 | + |
|
61 | +This command allows us to edit the EFI variables though EFISTUB, the [Arch Wiki](https://wiki.archlinux.org/title/EFISTUB#Using_UEFI_directly) has a really good selection about using `efibootmgr`. Here is my output as an example since I will be using the output in the next section: |
|
62 | + |
|
63 | +``` |
|
64 | +BootNext: 0001 |
|
65 | +BootCurrent: 0001 |
|
66 | +Timeout: 2 seconds |
|
67 | +BootOrder: 0001,000A,0002,0006,0000 |
|
68 | +Boot0000* UiApp |
|
69 | +Boot0001* Pop!_OS 22.04 LTS |
|
70 | +Boot0002* WDC WDS120G2G0B-00EPW0 |
|
71 | +Boot0006* WDC WDS100T2B0C-00PXH0 |
|
72 | +Boot000A* Linux Boot Manager |
|
73 | +``` |
|
74 | + |
|
75 | +Now you may not have the "BootNext:" option if you haven't used `efibootmgr` before. |
|
76 | + |
|
77 | +## Desktop files |
|
78 | + |
|
79 | +You can make your own desktop file and for system-wide you would put them in `/usr/share/applications/` but if you want them just for your user you can use `~/.local/share/applications/`. We can make .desktop files for these boot entries to set them as the next boot target but once you reboot again it reverts to using "BootOrder" order instead. |
|
80 | + |
|
81 | +This is my file for booting Arch on the next reboot: |
|
82 | + |
|
83 | +``` |
|
84 | +[Desktop Entry] |
|
85 | +Encoding=UTF-8 |
|
86 | +Version=1.0 |
|
87 | +Type=Application |
|
88 | +Terminal=false |
|
89 | +Exec=sh -c "pkexec efibootmgr -n 000A" |
|
90 | +Name=Boot to Arch |
|
91 | +Icon=/home/aaronh/Documents/archlinux-icon.svg |
|
92 | +``` |
|
93 | + |
|
94 | +and this is my file for booting Pop!_OS on the next boot: |
|
95 | + |
|
96 | +``` |
|
97 | +[Desktop Entry] |
|
98 | +Encoding=UTF-8 |
|
99 | +Version=1.0 |
|
100 | +Type=Application |
|
101 | +Terminal=false |
|
102 | +Exec=sh -c "pkexec efibootmgr -n 0001" |
|
103 | +Name=Boot to Pop!_OS |
|
104 | +Icon=/home/aaronh/Documents/pop_icon.svg |
|
105 | +``` |
|
... | ... | \ No newline at end of file |
Linux/ubuntu-notes.md
... | ... | @@ -0,0 +1,73 @@ |
1 | +# GRUB |
|
2 | + |
|
3 | +| Commands | What it does | |
|
4 | +|:--------:|:------------:| |
|
5 | +| sed -i 's/^GRUB_CMDLINE_LINUX_DEFAULT="/&option /' /etc/default/grub | adds kernel option to GRUB file | |
|
6 | + |
|
7 | +Replace &option with the kernel param like quiet or similar. |
|
8 | + |
|
9 | +> *NOTE:* you will need to run this command when making changes to GRUB's file before rebooting: |
|
10 | + |
|
11 | +```bash |
|
12 | +sudo update-grub |
|
13 | +``` |
|
14 | + |
|
15 | +Editing the /etc/default/grub file and changing the GRUB_DEFAULT line to match this will boot the previous kernel as the default: |
|
16 | + |
|
17 | +GRUB_DEFAULT="1>3" |
|
18 | + |
|
19 | +Run the update-grub command to save that change. |
|
20 | + |
|
21 | +## fwupd |
|
22 | + |
|
23 | +| Commands | What it does | |
|
24 | +|:--------:|:------------:| |
|
25 | +| fwupdmgr get-devices | List devices supported by fwupd | |
|
26 | +| fwupdmgr get-updates | Perform updates to devices supported by fwupd | |
|
27 | +https://wiki.archlinux.org/title/fwupd |
|
28 | + |
|
29 | +## Ubuntu/Pop |
|
30 | + |
|
31 | +### apt/dpkg |
|
32 | + |
|
33 | +| Commands | What it does | |
|
34 | +| :------------------------------------------------------: | :--------------------------------------------------: | |
|
35 | +| apt policy packagename | Package information | |
|
36 | +| apt-cache madison packagename | List available versions for a package | |
|
37 | +| sudo apt install packagename –dry-run | See what packages will be installed with the package | |
|
38 | +| apt policy packagename | Find version installed and available | |
|
39 | +| sudo dpkg --remove --force-remove-reinstreq package_name | Remove broken package | |
|
40 | +| sudo apt-mark hold packagename | Hold a package to the current version | |
|
41 | +| dpkg --list | grep linux-image | |
|
42 | +| apt list --installed | grep packagename | |
|
43 | +## kernel commands |
|
44 | + |
|
45 | +| Commands | What it does | |
|
46 | +| ------------------------------------------- | ------------------------------------------- | |
|
47 | +| sudo update-initramfs -c -k *kernelversion* | Generate a new initramfs image with version | |
|
48 | + |
|
49 | +# [flatpak](https://docs.flatpak.org/en/latest/using-flatpak.html) |
|
50 | + |
|
51 | +| Commands | What it does | |
|
52 | +|:--------:|:------------:| |
|
53 | +| flatpak update | Update flatpak packages | |
|
54 | +| flatpak list | Show the installed flatpak packages | |
|
55 | +| flatpak search | Search flatpak packages from sources | |
|
56 | +| flatpak remotes | List Flatpak remotes (other servers) | |
|
57 | + |
|
58 | +# Plasma |
|
59 | + |
|
60 | +| Commands | What it does | |
|
61 | +|:--------:|:------------:| |
|
62 | +| kioclient exec path/to/desktop/file | Runs the .desktop file | |
|
63 | + |
|
64 | +# GNOME |
|
65 | + |
|
66 | +## GSettings |
|
67 | + |
|
68 | +| Commands | What it does | |
|
69 | +| :------: | :----------: | |
|
70 | +| gsettings set org.gnome.desktop.interface scaling-factor 2 | Change scaling for the UI | |
|
71 | +| gsettings set com.ubuntu.user-interface.desktop cursor-size 48 | Enlarge cursor | |
|
72 | +| gsettings set org.gnome.desktop.background picture-uri 'file://PathToImage' | Change wallpaper | |
|
73 | +| gsettings set org.gnome.desktop.wm.preferences button-layout "appmenu:minimize,maximize,close" | Enable Minimize and Maximize buttons | |