started conversion to asciidoc
This commit is contained in:
parent
bb24005bb0
commit
605b53fa3b
@ -4,3 +4,4 @@
|
|||||||
- nmap / zenmap // Network mapping tool
|
- nmap / zenmap // Network mapping tool
|
||||||
- wireshark // Network traffic sniffer
|
- wireshark // Network traffic sniffer
|
||||||
- theharvester // Employee discovery, mail discovery and pgp verification tool, among other useful stuff
|
- theharvester // Employee discovery, mail discovery and pgp verification tool, among other useful stuff
|
||||||
|
- https://nitter.net/ // Search people and tweets
|
||||||
|
@ -1,216 +1,236 @@
|
|||||||
-Qt for wayland requires qt5-wayland package and "export QT_QPA_PLATFORM=wayland"
|
= An Open Source collection of common problems and solutions for *nix users
|
||||||
|
Alessandro Mauri <alemauri001@gmail.com>
|
||||||
|
v1.0, 2019-12-02
|
||||||
|
:doctype: manpage
|
||||||
|
|
||||||
-You still have tor and "arm" to monitor it
|
== Arch Linux
|
||||||
|
|
||||||
-Docker is pretty cool you should use it, https://www.kali.org/news/official-kali-linux-docker-images/
|
=== Links useful during an arch install
|
||||||
also works with wifite2, it basically is a shell-oriented low-weight high-performance virtual machine
|
https://wiki.archlinux.org/index.php/Installation_guide[1],
|
||||||
wich can run prebuilt docker images or your personal docker images. Docs: https://docs.docker.com/
|
https://wiki.archlinux.org/index.php/GRUB[2],
|
||||||
|
https://wiki.archlinux.org/index.php/General_recommendations#Users_and_groups[3],
|
||||||
|
https://wiki.archlinux.org/index.php/EFI_system_partition[4],
|
||||||
|
https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/Disks[5],
|
||||||
|
https://wiki.archlinux.org/index.php/List_of_applications[6],
|
||||||
|
|
||||||
# ARCH SECTION
|
=== Pacman commands
|
||||||
|
* `pacman -Syy`: update repositories
|
||||||
|
* `pacman -Su`: update packages
|
||||||
|
* `pacman -Qdtq`: list unused/orphan packages
|
||||||
|
* `pacman -R`: remove a package
|
||||||
|
* `pacman -S`: install a package
|
||||||
|
* `pacman -R $(pacman -Qdtq)`: remove orphaned packages recursively
|
||||||
|
* `pacman -Rns`: remove packages and its dependencies recursively
|
||||||
|
* `pacman -Rcs`: remove packages and its dependents recursively
|
||||||
|
* `pacman -Ql`: list all package's files and locations
|
||||||
|
* `pacman -Qqe`: list all installed packages
|
||||||
|
* `pacman -Qc`: view package changelog
|
||||||
|
* `pacman -Qm`: list packages not present in official repositories
|
||||||
|
|
||||||
-Links useful during an arch install:
|
If there are update related errors that you do not understand, do not panic
|
||||||
https://wiki.archlinux.org/index.php/Installation_guide
|
issue a full update with the following commands:
|
||||||
https://wiki.archlinux.org/index.php/GRUB
|
`sudo pacman -Syy` and then `sudo pacman -Su`
|
||||||
https://wiki.archlinux.org/index.php/General_recommendations#Users_and_groups
|
|
||||||
https://wiki.archlinux.org/index.php/EFI_system_partition
|
|
||||||
https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/Disks
|
|
||||||
https://wiki.archlinux.org/index.php/List_of_applications
|
|
||||||
|
|
||||||
-Pacman commands:
|
If you get an error similar to `could not unlock database` when trying to
|
||||||
"pacman -Syy" update repositories
|
issue a command that means that another program is using the package manager.
|
||||||
"pacman -Su" update packages
|
If you feel like taking the risk of breaking your system try manually (and forcefully)
|
||||||
"pacman -Qdtq" list unused/orphan packages
|
removing the transaction lock file by issuing `rm -rf /var/lib/pacman/db.lck`
|
||||||
"pacman -R" remove a package
|
|
||||||
"pacman -S" install a package
|
|
||||||
"pacman -R $(pacman -Qdtq)" remove unused packages
|
|
||||||
"pacman -Rns" remove packages and its dependencies recursively
|
|
||||||
"pacman -Rcs" remove packages and its dependents recursively
|
|
||||||
"pacman -Ql" list all package's files and locations
|
|
||||||
"pacman -Qqe" list all installed packages
|
|
||||||
"pacman -Qc" view package changelog
|
|
||||||
"pacman -Qm" list packages not present in official repositories
|
|
||||||
If you panic just do "sudo pacman -Syy" and then "sudo pacman -Su"
|
|
||||||
"rm -rf /var/lib/pacman/db.lck" remove pacman's transaction lock file
|
|
||||||
(to solve "could not unlock database" error, which happen when pacman is already running)
|
|
||||||
NOTE: If all of a sudden everything is fucked up bad (like no GUI whatsowever)
|
|
||||||
check the pacman log at "/var/log/pacman.log" to see what went wrong and what got removed
|
|
||||||
To manage and download packages from the AUR use:
|
|
||||||
pikaur: https://github.com/actionless/pikaur#installation
|
|
||||||
yaourt (unmantained)
|
|
||||||
These are all wrappers which means they extend some functionalities of pacman to use
|
|
||||||
AUR, for example updating and installing packages (-Syu and -S)
|
|
||||||
NOTE: pacman wrappers don't need to be run as root since it's dangerous to
|
|
||||||
run PKGBUILD as such.
|
|
||||||
Pacman GUI frontends:
|
|
||||||
"pamac" based on gtk and it is the same GUI frontend in the gnome and KDE releases
|
|
||||||
of manjaro, to install use the package "pamac-aur" or "pamac-aur-git" from the AUR.
|
|
||||||
"octopi" is a lightweight GUI frontend for pacman and it is one of the most used ones
|
|
||||||
although it isn't as visually appealing as pamac and requires a gtk sudo permission
|
|
||||||
package such as "blank don't remember"
|
|
||||||
Ranking mirrors based on speed:
|
|
||||||
|
|
||||||
|
In the unfortunate event that all of a sudden everything fucked up bad
|
||||||
|
(like no xorg or wayland or login session ...),
|
||||||
|
check the pacman log at `/var/log/pacman.log` to see what went wrong and what got removed
|
||||||
|
|
||||||
|
=== AUR pacman wrappers
|
||||||
|
* https://github.com/actionless/pikaur#installation[pikaur]
|
||||||
|
* https://github.com/Jguer/yay[yay]
|
||||||
|
|
||||||
|
Pacman GUI frontends (I advice you to not use them)::
|
||||||
|
* `pamac`: based on gtk and it is the same GUI frontend in the gnome and KDE releases
|
||||||
|
of manjaro, install `pamac-aur` or `pamac-aur-git` from the AUR.
|
||||||
|
* `octopi`: is a lightweight GUI frontend for pacman and it is one of the most used ones
|
||||||
|
although it isn't as visually appealing as pamac and requires a gtk permission manager.
|
||||||
|
|
||||||
|
=== Network management
|
||||||
|
Sources::
|
||||||
|
https://wiki.archlinux.org/index.php/Netctl[1]
|
||||||
|
https://www.raspberrypi.org/forums/viewtopic.php?t=54080[2]
|
||||||
|
https://wiki.archlinux.org/index.php/Dhcpcd#Static_profile[3]
|
||||||
|
|
||||||
-Network management
|
|
||||||
Arch uses netctl to manage connections, all the config files and examples are under
|
Arch uses netctl to manage connections, all the config files and examples are under
|
||||||
/etc/netctl/ and /etc/netctl/examples
|
`/etc/netctl/` `and /etc/netctl/examples` +
|
||||||
References: https://wiki.archlinux.org/index.php/Netctl
|
*NOTE*: This is valid for every system that uses systemd(ick)
|
||||||
https://www.raspberrypi.org/forums/viewtopic.php?t=54080
|
|
||||||
https://wiki.archlinux.org/index.php/Dhcpcd#Static_profile
|
|
||||||
|
|
||||||
-Network managers:
|
== Void Linux
|
||||||
NetworkManager: default in many distros pretty good but resorce heavy (also depends on systemd?)
|
|
||||||
void: https://docs.voidlinux.org/config/network/networkmanager.html
|
|
||||||
arch: https://wiki.archlinux.org/index.php/NetworkManager
|
|
||||||
Connman: small and fast, does all you need and doesn't hog on resources and has vpn support
|
|
||||||
void: https://wiki.voidlinux.org/Connman
|
|
||||||
arch: https://wiki.archlinux.org/index.php/ConnMan
|
|
||||||
Wicd: outdated by now and written in python 2.7, still pretty good for simple configurations
|
|
||||||
|
|
||||||
# VOID LINUX SECTION
|
Hold package updates::
|
||||||
|
* Hold: `xbps-pkgdb -m hold <pkg>`
|
||||||
|
* Unhold: `xbps-pkgdb -m unhold <pkg>`
|
||||||
|
* List packages on hold: `xbps-query --list-hold-pkgs`
|
||||||
|
|
||||||
-Hold pkgs form updating
|
== Sysadmin stuff
|
||||||
hold: xbps-pkgdb -m hold <pkg>
|
|
||||||
unhold: xbps-pkgdb -m unhold <pkg>
|
|
||||||
list on hold: xbps-query --list-hold-pkgs
|
|
||||||
|
|
||||||
# SYSADMIN SECTION
|
=== Fixing mandoc.db permission denied
|
||||||
|
*Source*: https://old.reddit.com/r/voidlinux/comments/dsdn5a/did_sudo_behaviour_change_recently/[link]
|
||||||
|
|
||||||
-Fixing mandoc.db permission denied
|
If you ran `sudo makewatis ...` then it is possible that the file permissions
|
||||||
Source: https://old.reddit.com/r/voidlinux/comments/dsdn5a/did_sudo_behaviour_change_recently/
|
of `/usr/share/man/mandoc.db` and `/usr/local/share/man/mandoc.db` were changed from
|
||||||
If you ran "sudo makewatis ..." then it is possible that the file permissions
|
|
||||||
of /usr/share/man/mandoc.db and /usr/local/share/man/mandoc.db were changed from
|
|
||||||
644 (rw-r--r--) to 600 (rw-------), giving the error when viewing man pages
|
644 (rw-r--r--) to 600 (rw-------), giving the error when viewing man pages
|
||||||
"... mandoc.db permission denied" or "data changed but could not update mandoc.db" etc.
|
`... mandoc.db permission denied` or `data changed but could not update mandoc.db` etc.
|
||||||
To fix this simply do: sudo chmod 644 /usr/share/man/mandoc.db
|
To fix this simply do:
|
||||||
|
|
||||||
|
sudo chmod 644 /usr/share/man/mandoc.db
|
||||||
sudo chmod 644 /usr/local/share/man/mandoc.db
|
sudo chmod 644 /usr/local/share/man/mandoc.db
|
||||||
|
|
||||||
-"acpi" is kinda important in laptops "acpi -i" for info, also "thinkpad_acpi" should be noted
|
=== Important packages
|
||||||
|
* `acpi` gives information and control on battery and power status, it can also handle
|
||||||
|
power related events (lid open/close, power button press, etc.)
|
||||||
|
* `thinkpad_acpi` acpi addon specific to thinkpads
|
||||||
|
|
||||||
-Basic commands:
|
=== Qt in wayland
|
||||||
GREP:
|
To run QT prigrams in wayland install `qt5-wayland` and add the followind line somewhere
|
||||||
G-REP or "grep" can be used to filter command results:
|
in your profile (.profile .zprofile .bash_profile etc.)
|
||||||
"ps ax | grep whatyouwant" and it will output the line containing "whatyouwant"
|
`export QT_QPA_PLATFORM=wayland`
|
||||||
example "dmesg | grep whatyouwant"
|
|
||||||
NOTE: "|" is used to pipe the output in another program
|
=== Monitor Tor network usage
|
||||||
PS:
|
install the `arm` package and run it
|
||||||
Ps is a UNIX tool used to get information about the current status of the system
|
|
||||||
|
=== Basic commands
|
||||||
|
* `grep`: find the lines which contain the input string: +
|
||||||
|
`ps ax | grep <query>` and it will output the line containing the query +
|
||||||
|
`grep <query> file.txt` search matches in file +
|
||||||
|
`grep -i <query> file.txt` case insensitive search
|
||||||
|
* `ps`: Ps is a UNIX tool used to get information about the current status of the system. +
|
||||||
The most basic and or useful usage is to view all the running processes and the corresponding
|
The most basic and or useful usage is to view all the running processes and the corresponding
|
||||||
UUIDs (like if you want to kill process and you need its UUID), that is done by appending "ax"
|
UUIDs, that is done by appending `ax` to ps: +
|
||||||
to ps: "ps ax"
|
`ps ax`
|
||||||
KILL:
|
* `kill`: kill the specified process given its UUID: +
|
||||||
It kill the specified process given its UUID, syntax "kill <UUID>"
|
`kill <UUID>`
|
||||||
"|" and ">":
|
* `killall`: kill all the processes which name matches the arguments: +
|
||||||
|
`killall <proc name>`
|
||||||
|
* `|` and `>`:
|
||||||
These are both "pipe" functions, they can pipe the output of a script or program into
|
These are both "pipe" functions, they can pipe the output of a script or program into
|
||||||
something (via std i/o), but they are used differently in the sense that "|" is specifically
|
something (via std i/o), but they are used differently in the sense that `|` is
|
||||||
used to pipe the output into another program EX: "ps ax | grep gnome-shell", this outputs the UUIDs
|
used to pipe the output into another program, example: +
|
||||||
of all the gnome-shell instances since the output of "ps ax" is piped into GREP which in turn
|
`ps ax | grep xorg` this outputs all the runnng processes into grep as
|
||||||
returns just the results of the query.
|
input, which in turn filters the result. +
|
||||||
On the other hand ">" is used to pipe the output into a file EX: "ls -la > ls.txt", this puts
|
On the other hand `>` is used to pipe the output into a file, example: +
|
||||||
the output of ls into ls.txt which we can then read.
|
`ls -la > ls.txt` this puts the output of ls into ls.txt which we can then read.
|
||||||
"whoami" and "groups":
|
*NOTE*: `>` replaces everything that was in the file
|
||||||
they respectively output the current user and groups
|
* `<`: same thing as `>` but in "reverse"
|
||||||
NOTE: one alternative to "whoami" is "echo $USER" which can be used in scripts
|
* `>>` and `<<`: same as `<` and `>` but appends instead of replacing
|
||||||
FIND:
|
* `whoami` and `groups`:
|
||||||
Sources:
|
they respectively output the current user and groups +
|
||||||
https://www.cyberciti.biz/faq/how-do-i-find-all-the-files-owned-by-a-particular-user-or-group/
|
*NOTE*: one alternative to `whoami` is `echo $USER` which can be used in scripts
|
||||||
refer to man for all the available options
|
* `find`: Basic syntax: +
|
||||||
Basic syntax:
|
`find <dir> [OPTIONS]` +
|
||||||
"find <dir> [OPTIONS]"
|
Some options: +
|
||||||
OPTIONS:
|
** `-user <user>`: find files owned by a particular user
|
||||||
"-user <user>" find files owned by a particular user
|
** `-group <group>`: find files owned by a particular group
|
||||||
"-group <group>" find files owned by a particular group
|
** `-ls`: list results in "ls" format:
|
||||||
"-ls" list results in "ls" format:
|
** `-name <filename>`: find a specific file or pattern (*.txt)
|
||||||
"-name <filename>" find a specific file or pattern (*.txt)
|
|
||||||
|
|
||||||
-Groups:
|
=== Group actions
|
||||||
Adding users to groups:
|
* Adding a user to a group: +
|
||||||
"usermod -a -G group user"
|
`usermod -a -G group user` then reboot
|
||||||
reboot
|
* Listing all groups: +
|
||||||
Listing all groups:
|
`cut -d: -f1 /etc/group | sort`
|
||||||
"cut -d: -f1 /etc/group | sort"
|
* Deleting a group: +
|
||||||
|
`groupdel <group name>` then reboot
|
||||||
|
|
||||||
-Users:
|
=== Users actions
|
||||||
Creating a new user:
|
* Creating a new user: +
|
||||||
useradd -m user-name
|
`useradd -m user-name`
|
||||||
Deleting an existing user:
|
* Deleting an existing user: +
|
||||||
userdel user-name
|
`userdel user-name`
|
||||||
|
|
||||||
-Linux afterinstall (how to get thing working):
|
=== Generating locales
|
||||||
Bluetooth usage:
|
. Add locales by uncommenting them in `/etc/locale.gen`
|
||||||
Refers to:
|
. generate locales by running `locale-gen`
|
||||||
https://wiki.archlinux.org/index.php/Bluetooth_headset
|
. Reboot
|
||||||
https://wiki.archlinux.org/index.php/bluetooth
|
|
||||||
Start the "bluetooth.service" service then refer to:
|
*NOTE*: some languages (russian, chinese, japanese) require specific fonts to be installed
|
||||||
Generating locales (languages and language support):
|
refer to: https://wiki.archlinux.org/index.php/Localization[link] for an incomplete list of specific fonts
|
||||||
Add locales uncommenting them in /etc/locale.gen
|
|
||||||
Run "locale-gen"
|
=== Getting the graphics drivers
|
||||||
Reboot
|
For Intel graphics cards::
|
||||||
NOTE: if installing locales with a specific character set (russian, chinese, japanese)
|
*Source*: https://wiki.archlinux.org/index.php/intel_graphics[link] +
|
||||||
it is needed to also install the specific fonts, refer to:
|
Install `mesa` on arch or `mesa-intel-dri` on void and `xf86-video-intel`
|
||||||
"https://wiki.archlinux.org/index.php/Localization" to find the specific font packages
|
For nvidia graphics cards::
|
||||||
and install them using pacman
|
Follow the steps in: https://wiki.archlinux.org/index.php/NVIDIA#Installation[link]
|
||||||
Getting the graphics drivers:
|
For AMD graphics cards::
|
||||||
For Intel graphics cards:
|
Install: `mesa` on arch or `mesa-ati-dri` on void and `xf86-video-ati` for Xorg hardware acceleration support
|
||||||
Refers to: https://wiki.archlinux.org/index.php/intel_graphics
|
|
||||||
mesa
|
=== Adding entropy to your system (faster boot times)
|
||||||
lib32-mesa
|
*Source*: https://wiki.archlinux.org/index.php/Random_number_generation[link] +
|
||||||
vulkan-intel
|
|
||||||
For nvidia graphics cards:
|
|
||||||
Please refer to: https://wiki.archlinux.org/index.php/NVIDIA#Installation
|
|
||||||
For amd graphics cards:
|
|
||||||
mesa
|
|
||||||
lib32-mesa
|
|
||||||
xf86-video-ati: for Xorg hardware acceleration support
|
|
||||||
mesa-vdpau and lib32-mesa-vdpau: for accelerated video decoding
|
|
||||||
Adding entropy to your system:
|
|
||||||
Refers to: https://wiki.archlinux.org/index.php/Random_number_generation
|
|
||||||
This is useful as the kernel's built-in random number generator is very slow, as such
|
This is useful as the kernel's built-in random number generator is very slow, as such
|
||||||
it makes tasks like loading the login manager a pain.
|
it makes tasks like loading the login manager a pain.
|
||||||
To solve this problem you can install some pseudo-random number generators such as:
|
To solve this problem you can install some pseudo-random number generators such as:
|
||||||
"rng-tools" secure, uses more CPU
|
* `rng-tools` secure but uses more CPU
|
||||||
"haveged" fast and lightweight
|
* `haveged` fast and lightweight but less secure
|
||||||
NOTE: Keep in mind that these are not for secure systems and remember to start and enable the service
|
*NOTE*: Keep in mind that these are not for secure systems and remember to start and enable the service
|
||||||
rngd.service
|
rngd.service
|
||||||
Getting NTFS support working:
|
|
||||||
Refers to: https://wiki.archlinux.org/index.php/NTFS-3G
|
|
||||||
Install the "ntfs-3g" package
|
|
||||||
|
|
||||||
-Listing installed packages:
|
=== NTFS partitions support
|
||||||
With apt/apt-get:
|
*Source*: https://wiki.archlinux.org/index.php/NTFS-3G[link] +
|
||||||
"apt list --installed"
|
Install `ntfs-3g`
|
||||||
With pacman:
|
|
||||||
"pacman -Qqe"
|
|
||||||
With xbps:
|
|
||||||
xbps-query -m
|
|
||||||
|
|
||||||
-Changing the default shell
|
=== Listing all installed packages
|
||||||
To change your default shell to something other than bash use:
|
With apt/apt-get: `apt list --installed` +
|
||||||
"chsh -s full-path-to-shell" for example "chsh -s /bin/zsh"
|
With pacman: `pacman -Qqe` +
|
||||||
to list all installed shells use "chsh -l"
|
With xbps: `xbps-query -m` +
|
||||||
|
|
||||||
-Changing keyboard layout:
|
=== Changing the default shell
|
||||||
Source: https://superuser.com/questions/1147320/how-to-change-keyboard-layout-in-i3
|
* `chsh -l` list all installed shells and respective path
|
||||||
In the system console type "layout <layout>"
|
* `chsh -s <path-to-shell>` set the shell for the current user
|
||||||
In i3, dwm (and possibly other wms) "setxkbmap -layout <layout>"
|
|
||||||
|
|
||||||
-"https://wiki.archlinux.org/index.php/systemd" just helpful
|
=== Changing keyboard layout
|
||||||
|
*Source*: https://superuser.com/questions/1147320/how-to-change-keyboard-layout-in-i3[link] +
|
||||||
|
In a tty (no graphical envirnment line ssh) type: `layout <layout>` +
|
||||||
|
In a graphical environment (or terminal emulator) type: `setxkbmap <layout>`
|
||||||
|
|
||||||
-To run .jar files in cli you must use "java -jar"
|
-To run .jar files in cli you must use "java -jar"
|
||||||
|
|
||||||
-To list all partitions "sudo fdisk -l"
|
=== Disk and volume info
|
||||||
|
Graphical::
|
||||||
|
* `gparted` graphical tool for managing disks and partitions
|
||||||
|
Terminal::
|
||||||
|
Partitioning tools:::
|
||||||
|
* `fdisk`
|
||||||
|
* `parted`
|
||||||
|
Listing drives and mount points:::
|
||||||
|
* `fdisk -l` more info
|
||||||
|
* `lsblk`
|
||||||
|
Listing drive UUIDs:::
|
||||||
|
* `blkid`
|
||||||
|
|
||||||
-To list all partition UUIDs "sudo blkid"
|
=== Automatically mount volumes
|
||||||
|
Install `udevil` and start `devmon` at login/boot
|
||||||
|
|
||||||
-Change default file openers:
|
=== Check disk health (if available)
|
||||||
Source: https://wiki.archlinux.org/index.php/XDG_MIME_Applications
|
Install `smartmontools`, then check the drive's compatibility with
|
||||||
create a file (if not present) in .config called mimeapps.list
|
....
|
||||||
search your file extension in https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Complete_list_of_MIME_types
|
smartctl -c /dev/sdX
|
||||||
add or modify the entry to that mimetype to be opened with the desired app.desktop
|
....
|
||||||
IF app.desktop IS NOT PRESENT:
|
Then either run a short test
|
||||||
look again in /usr/share/applications
|
....
|
||||||
if it is not present make one and put it into:
|
smartctl -t short /dev/sdX
|
||||||
~/.local/share/applications/
|
....
|
||||||
|
Or a long test
|
||||||
|
....
|
||||||
|
smartctl -t long /dev/sdX
|
||||||
|
....
|
||||||
|
lastly run `smartctl -H /dev/sdX` to get the results
|
||||||
|
|
||||||
|
=== Change default file openers
|
||||||
|
*Source*: https://wiki.archlinux.org/index.php/XDG_MIME_Applications[link]
|
||||||
|
. Create a file (if not present) in `$HOME/.config` called `mimeapps.list`
|
||||||
|
. Search your file extension in https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Complete_list_of_MIME_types[link]
|
||||||
|
. Add or modify the entry to that mimetype to be opened with the desired `<applications>.desktop`
|
||||||
|
*IF* `<application>.desktop` *IS NOT PRESENT*:
|
||||||
|
. Look again in `/usr/share/applications`
|
||||||
|
. If it is not present make one and put it into: `~/.local/share/applications/` +
|
||||||
with the format:
|
with the format:
|
||||||
|
|
||||||
[Desktop Entry]
|
[Desktop Entry]
|
||||||
Name=Xpdf
|
Name=Xpdf
|
||||||
Comment=Views Adobe PDF (acrobat) files
|
Comment=Views Adobe PDF (acrobat) files
|
||||||
@ -220,65 +240,65 @@
|
|||||||
Icon=xpdf
|
Icon=xpdf
|
||||||
Categories=Office;
|
Categories=Office;
|
||||||
MimeType=application/pdf;
|
MimeType=application/pdf;
|
||||||
NOTE: Exec= are the execution parameters
|
|
||||||
|
|
||||||
-To check a disk's health you need "smartmontools", first check system compatibility with "sudo smartctl -c /dev/sdX"
|
*NOTE*: `Exec=` are the execution parameters (-b, -l, etc.)
|
||||||
then either do a short test "sudo smartctl -t short /dev/sdX" or a long test "sudo smartctl -t long /dev/sdX"
|
|
||||||
lastly do "sudo smartctl -H /dev/sdX" to get the results
|
|
||||||
|
|
||||||
-Recompiling compilers for zerynth:
|
=== Recompiling compilers for zerynth
|
||||||
If facing compiling errors in zerynth, manually recompile the compiler for the board in ""~/.zerynth2/sys"
|
If you are facing compiling errors in zerynth, one option is to manually
|
||||||
for example replacing the xtensa-lx106 compiler (esp8266) goes:
|
recompile the compiler for the board/platform. Compilers are locarted at
|
||||||
1-Move the old compiler folder somewhere safe (~/.zerynth2/sys/xtensa-lx106)
|
`~/.zerynth2/sys` +
|
||||||
2-Clone and compile (as standalone) new compiler in a temporary folder, guide here -> "http://domoticx.com/sdk-esp8266-xtensa-architecture-toolchain/"
|
For example to replace the `xtensa-lx106` compiler: (esp8266)
|
||||||
3-Move the newly created compiler folder (xtensa-lx106-elf) in ~/.zerynth2/sys and rename it as the original one (xtensa-lx106/)
|
. Move the old compiler folder (located at `~/.zerynth2/sys/xtensa-lx106`) somewhere safe
|
||||||
4-Copy the old package.json in the new compiler folder
|
. Clone and compile (as standalone) new compiler in a temporary folder, guide here
|
||||||
Better yet is to wait for an official fix and report the bug on the troubleshooting section
|
http://domoticx.com/sdk-esp8266-xtensa-architecture-toolchain/[link]
|
||||||
Also the same thing has to be done with the xtensa-lx6 compiler (esp32)
|
. Move the fresh compiler folder (xtensa-lx106-elf) in `~/.zerynth2/sys` and rename it as the original one (xtensa-lx106/)
|
||||||
"https://dl.espressif.com/doc/esp-idf/latest/get-started/linux-setup.html"
|
. Copy the old package.json in the new compiler folder
|
||||||
|
|
||||||
-Various permission errors:
|
*NOTE*: Better yet is to wait for an official fix and report the bug on the troubleshooting section +
|
||||||
Arduino permissions:
|
Link for the `xtensa-lx6` compiler: (esp32)
|
||||||
Source: https://www.howtogeek.com/50787/add-a-user-to-a-group-or-second-group-on-linux/
|
https://dl.espressif.com/doc/esp-idf/latest/get-started/linux-setup.html[link]
|
||||||
"ls -la /dev/tty*" and see which group TTYs are in, then add yourself to that group:
|
|
||||||
"usermod -a -G examplegroup exampleusername" or just use "$USER" to add current user, then reboot.
|
|
||||||
Wireshark permissions:
|
|
||||||
"usermod -a -G wireshark $USER"
|
|
||||||
Pen drive in read only:
|
|
||||||
Refers to: https://www.youtube.com/watch?v=F4lAlb74mGs
|
|
||||||
unmount the pen drive (4exmpl /dev/sdb1)
|
|
||||||
type as superuser "dosfsck -a /dev/sdb1"
|
|
||||||
remount
|
|
||||||
profit
|
|
||||||
|
|
||||||
-Arduino not starting:
|
=== Various permission errors
|
||||||
Try installing "arduino-avr-core" package
|
Arduino permissions::
|
||||||
|
*Source*: https://www.howtogeek.com/50787/add-a-user-to-a-group-or-second-group-on-linux/[link] +
|
||||||
|
`ls -la /dev/tty*` and see which group TTYs are in, then add yourself to that group: +
|
||||||
|
`usermod -a -G <group> <user>` or just use `$USER` to add current user, then reboot.
|
||||||
|
Wireshark permissions::
|
||||||
|
....
|
||||||
|
usermod -a -G wireshark $USER
|
||||||
|
....
|
||||||
|
Pen drive in read only::
|
||||||
|
*Source*: https://www.youtube.com/watch?v=F4lAlb74mGs[link] +
|
||||||
|
. Unmount the pen drive (`/dev/sdXx`)
|
||||||
|
. Run `dosfsck -a /dev/sdXx`
|
||||||
|
. Remount
|
||||||
|
|
||||||
-Cannot scroll down in VIM on st:
|
=== Cannot scroll down in VIM on st
|
||||||
one solution is to add "set ttymouse=sgr" to your .vimrc
|
Add `set ttymouse=sgr` to your .vimrc
|
||||||
|
|
||||||
-DEL key not working in st:
|
=== DEL key not working in st
|
||||||
source: https://www.reddit.com/r/archlinux/comments/8w4unu/setting_up_the_delete_key_in_st/
|
*source*: https://www.reddit.com/r/archlinux/comments/8w4unu/setting_up_the_delete_key_in_st/[link] +
|
||||||
add: tput smkx
|
Add `tput smkx` in your zshrc/bashrc or equivalent
|
||||||
in your zshrc or eqiuvalent
|
|
||||||
|
|
||||||
-Theming gnome:
|
=== Theming gnome
|
||||||
download the theme packages at "https://www.gnome-look.org/" and unzip them
|
download the themes packages https://www.gnome-look.org/[here] and unzip them
|
||||||
then depending if it is an icon theme or an normal theme place them in
|
then depending if it is an icon theme or an normal theme place them in
|
||||||
"/usr/share/icons" or "/usr/share/themes" accordingly
|
`/usr/share/icons` or `/usr/share/themes` accordingly
|
||||||
|
|
||||||
-Printing documents:
|
=== Printing documents
|
||||||
Refers to: https://wiki.archlinux.org/index.php/CUPS#Installation
|
*Source*: https://wiki.archlinux.org/index.php/CUPS#Installation[link] +
|
||||||
Install the "cups" package then start and enable it
|
Install `cups` then start and enable the cupsd service/daemon or socket if you want
|
||||||
To start a print use whatever printing program you have
|
on-demand activation. +
|
||||||
if you do not have a print manager program you can always open up the web interface in your browser at:
|
To add and configure a printer either do it in your print manager or trough the cups web interface
|
||||||
localhost:631
|
at the address: `localhost:631` +
|
||||||
NOTE: you might need to add printers and to do so, in some cases like for KDE, you'll need to be logged as root
|
*NOTE*: adding and modifying printers requires administator (root) permissions, so
|
||||||
|
in the web interface, when asked, insert the root credentials
|
||||||
|
|
||||||
|
=== Adding executables and shortcuts
|
||||||
|
*Sources*::
|
||||||
|
* https://askubuntu.com/questions/322772/how-do-i-add-an-executable-to-my-search-path[1]
|
||||||
|
* https://unix.stackexchange.com/questions/3809/how-can-i-make-a-program-executable-from-everywhere[2]
|
||||||
|
|
||||||
-Adding executables and shortcuts:
|
|
||||||
Refers to:
|
|
||||||
https://askubuntu.com/questions/322772/how-do-i-add-an-executable-to-my-search-path
|
|
||||||
https://unix.stackexchange.com/questions/3809/how-can-i-make-a-program-executable-from-everywhere
|
|
||||||
You have to add them to your $PATH, example: "export PATH="$PATH:$HOME/esp/xtensa-esp32-elf/bin"
|
You have to add them to your $PATH, example: "export PATH="$PATH:$HOME/esp/xtensa-esp32-elf/bin"
|
||||||
Quote "If you just type export PATH=$PATH:</path/to/file> at the command line it will only last for the length of the session.
|
Quote "If you just type export PATH=$PATH:</path/to/file> at the command line it will only last for the length of the session.
|
||||||
If you want to change it permanently add export PATH=$PATH:</path/to/file> to your ~/.bashrc file (just at the end is fine)."
|
If you want to change it permanently add export PATH=$PATH:</path/to/file> to your ~/.bashrc file (just at the end is fine)."
|
||||||
@ -499,6 +519,15 @@
|
|||||||
|
|
||||||
# NETWORK SECTION
|
# NETWORK SECTION
|
||||||
|
|
||||||
|
-Network managers:
|
||||||
|
NetworkManager: default in many distros pretty good but resorce heavy (also depends on systemd?)
|
||||||
|
void: https://docs.voidlinux.org/config/network/networkmanager.html
|
||||||
|
arch: https://wiki.archlinux.org/index.php/NetworkManager
|
||||||
|
Connman: small and fast, does all you need and doesn't hog on resources and has vpn support
|
||||||
|
void: https://wiki.voidlinux.org/Connman
|
||||||
|
arch: https://wiki.archlinux.org/index.php/ConnMan
|
||||||
|
Wicd: outdated by now and written in python 2.7, still pretty good for simple configurations
|
||||||
|
|
||||||
-Gathering information on network cards ie IP, MAC, status, etc.
|
-Gathering information on network cards ie IP, MAC, status, etc.
|
||||||
With ifconfig, just type "ifconfig" and it will give:
|
With ifconfig, just type "ifconfig" and it will give:
|
||||||
ether: the MAC address
|
ether: the MAC address
|
12911
linux_general.pdf
Normal file
12911
linux_general.pdf
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,61 +0,0 @@
|
|||||||
install: xorg-xinit and xorg xrandr
|
|
||||||
in void also install xorg-minimal, for dwm install:
|
|
||||||
base-devel libX11-devel libXft-devel libXinerama-devel
|
|
||||||
libEGL st and dmenu
|
|
||||||
|
|
||||||
add to .zprofile {
|
|
||||||
if [[ ! $DISPLAY && $XDG_VTNR -eq 1 ]]; then
|
|
||||||
exec startx
|
|
||||||
fi
|
|
||||||
|
|
||||||
on systemd-less systems:
|
|
||||||
|
|
||||||
if [[ ! $DISPLAY && $(tty) == /dev/tty1 ]]; then
|
|
||||||
exec startx
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
change layout in xinit: setxkbmap -layout fi
|
|
||||||
feh to change wallpaper: feh --bg-scale /dev/null
|
|
||||||
terminal: st
|
|
||||||
install: git
|
|
||||||
install: dwm, dmenu, pikaur
|
|
||||||
personalize dwm (clone)
|
|
||||||
|
|
||||||
apply patches: {
|
|
||||||
install via aur
|
|
||||||
download git
|
|
||||||
apply patches to git
|
|
||||||
make install
|
|
||||||
}
|
|
||||||
|
|
||||||
in void install: setxkbmap xsetroot
|
|
||||||
install acpi
|
|
||||||
|
|
||||||
install alsa-utils pulseaudio and pulseaudio-alsa
|
|
||||||
install pavucontrol to easily manage audio
|
|
||||||
install i3lock and i3lock-wrapper
|
|
||||||
|
|
||||||
use xrandr to change resolution
|
|
||||||
xrandr --output <monitor> --mode <resolution>
|
|
||||||
the mode has to be supported, check supported modes with 'xrandr'
|
|
||||||
if your monitor resolution is not listed try:
|
|
||||||
cvt 1920 1080 60
|
|
||||||
this gives you a modeline, paste it into:
|
|
||||||
xrandr --newmode <modeline>
|
|
||||||
then do
|
|
||||||
xrandr --addmode <monitor> <resolution>
|
|
||||||
|
|
||||||
install noto-fonts and noto-fonts-cjk for basic fonts
|
|
||||||
|
|
||||||
on void if getting too many nm-dispatcher logs install and configure: socklog and socklog-void
|
|
||||||
on artix: syslog-ng and either syslog-ng-openrc or ##-runit
|
|
||||||
|
|
||||||
notifications: install libnotify notification-daemon dunst
|
|
||||||
> profit
|
|
||||||
|
|
||||||
for global hotkeys install: sxhkd, configure it and add sxhkd & to .xinitrc
|
|
||||||
|
|
||||||
kakoune is a cool editor
|
|
||||||
nnn is the best file explorer
|
|
||||||
to install musl just install the package on arch
|
|
@ -37,7 +37,7 @@
|
|||||||
http://www.clifford.at/icestorm/
|
http://www.clifford.at/icestorm/
|
||||||
symbiflow (open souce fpga development):
|
symbiflow (open souce fpga development):
|
||||||
https://symbiflow.github.io/#hero
|
https://symbiflow.github.io/#hero
|
||||||
nextptr (oss gui router for ICE40 fpgas an more):
|
nextpnr (oss gui router for ICE40 fpgas an more):
|
||||||
https://github.com/YosysHQ/nextpnr
|
https://github.com/YosysHQ/nextpnr
|
||||||
-All 4chan banners:
|
-All 4chan banners:
|
||||||
https://imgur.com/a/40bUo
|
https://imgur.com/a/40bUo
|
||||||
|
Reference in New Issue
Block a user