This commit is contained in:
Malin Freeborn 2020-01-05 13:33:53 +01:00
parent a7bd1c2233
commit 1e89f9776d
12 changed files with 48 additions and 96 deletions

View File

@ -6,7 +6,10 @@ This is a list of quickstart guides for Linux programs.
2. The statements should go in order of how likely they are to be used: if `git add` has to be used by everyone, then it should go first.
3. The scripts should get someone up and running in the shortest possible time.
4. No explanations for the program. This isn't an introduction or advert, it's a guide for someone who already wants to use a program but doesn't know how.
5. Easy reference.
5. No presumed knowledge.
6. Easy reference.
As little knowledge as possible should be presumed, with required knowledge being internally linked. If general knowledge is presumed, it should be placed into a file named 'basics'.
# What's wrong with everything else?
@ -17,7 +20,7 @@ This is a list of quickstart guides for Linux programs.
- Often written in the 80's, and it shows.
- Zero respect for your time.
## tl;dr
## curl cheat.sh/
- Doesn't have the programs I like.
- Too short to get you started on many programs.

View File

@ -48,6 +48,8 @@ Back up an unmounted partition with ssh:
# img.xz
Install `xz`.
Unzip the image with:
> unxz void.img.xz

View File

@ -25,8 +25,6 @@ As a result, grep cannot read these characters as literal characters unless they
... will search the string 'wtf?' in the file log.txt. Another version is egrep (now used with 'grep -e') which uses more characters as special characters, or fgrep, which treats all characters as literal strings.
# Environmental Variables
PWD, USER, PATH

View File

@ -57,7 +57,6 @@ This prints from 10 until 2.
```
There's also 'until', which stops when something is true, rather than keeping going when something is true.
# For

View File

@ -8,7 +8,6 @@ For example:
This would run crontab every 7 days, and wait 15 minutes until after boot to run.
Various services from cron exist, e.g.
> sudo apt -y install cronie
@ -35,7 +34,6 @@ For example, you can update the database, meaning searches with 'locate' command
> */30 * * * * /usr/bin/updatedb
# Testing with runparts
Run-parts runs all executable scripts in a directory.

View File

@ -1,21 +0,0 @@
Change defaults with the `update-alternatives` command.
> sudo update-alternatives --config x-www-browser
Other defaults include:
* x-cursor-theme
* x-session-manager
* x-terminal-emulator
* x-window-manager
* x-www-browser
# Config Location
The appropriate files are located in /etc/alternatives/x-*

View File

@ -1,24 +0,0 @@
# Motherboard information
> sudo dmidecode
Motherboard info, upgrading BIOS, memory capacity, LAN connections.
# Disk Format information
> df
> df -h
# CPU
> cat /proc/cpuinfo
# Displays
xrandr, probably.
List displays ...
> xrandr --query

View File

@ -1,3 +1,17 @@
# Whereis the Program
Ask where the `angband` program is, along with all its configuration files:
`whereis angband`
Also `which` shows where a binary file (the program) is,
> which cmus
`type` shows what kind of thing you're running, be it an alias, or binary program.
> type cmus
# Quick Search for Files
You'll need to set up `locate` for this by installing `mlocate`. `mlocate` needs a list of all files on the machine, so run:
@ -8,21 +22,3 @@ Then to find a file called 'my-cats.jpg', run:
> locate cats
# Whereis
`whereis angband`
... shows where the angband program is, along with configuration files, and binaries.
Also `which` shows where a binary file (the program) is,
> which cmus
That's a lot of files for `cmus`, but you can find out exactly *which* is the program with:
> which cmus
`type` shows aliases:
> type cmus

View File

@ -18,15 +18,12 @@ will require sudo.
add user 'maestro'
This depends upon the settings in the /etc/default/useradd file and /etc/login.defs
> sudo useradd -m pinkie
add user 'pinkie' with a home directory
> sudo adduser -m -e 2017-04-25 temp
add expiry date to user
@ -67,49 +64,36 @@ add user maestro to group sudo
list users' passwords (and therefore users)
> groupadd awesome
create the group 'awesome'
passwords are stored in /etc/shadow.
there are user accounts for processes such as 'bin' and 'nobody' which are locked, so they're unusable.
> passwd -l bin
lock the user 'bin'
> more /etc/passwd | grep games
we find the name, password and user id of the user 'games'. I.e. the password is 'x', and the user id is '5'. The password is an impossible hash, so no input password could match.
> groupdel learners | delete the group 'learners'
> gpasswd -d pi games | remove user 'pi' from the group 'games'
> id games
find the id number of group 'games' (60)
> usermod -aG sudo maestro
add user to group 'maestro'
user info is stored in /etc's passwd, shadow, group and gshadow
# Defaults
The default new user profiles are under /etc/skel.
@ -146,7 +130,6 @@ usermod -L henry
-u let's you manually specifiy a UID.
# Groups
In /etc/group, a group file may look like this:
@ -219,4 +202,3 @@ Then have a look at resource usage per user.
This will modify process.sh to that instead of being simply executable, anyone executing it will have the permissions as if owner while executing it.

View File

@ -1,23 +1,25 @@
# Netstat Stuff
iftop -p -n
Stats on local net usage within domain.
> iftop -p -n
whois domain.com
> whois domain.com
dig domain.com
info on domain, whether it's taken, et c.
Info on domain, whether it's taken, et c.:
> dig domain.com
> ifconfig
Like ipconfig.
Versatile wifi tool:
> nmcli
Versatile wifi tool.
# Examples
You want to connect to the internet.
>sudo iwconfig
You want to connect to the internet.
> sudo iwconfig
Get knowledge of wireless state. The output might be:
@ -56,5 +58,6 @@ This tells you that your ESSID is 'Gandalf WajFaj', and the access point name is
Alternatively, you can use
> nmcli -ask device wifi connect [SSID]
And it'll ask for your password, so you're not typing it in in full view.

16
hardware/basics.md Normal file
View File

@ -0,0 +1,16 @@
# Motherboard Information
> sudo dmidecode
Motherboard info, upgrading BIOS, memory capacity, LAN connections.
# Disks
View currently inserted disks:
lsblk
# CPU
> cat /proc/cpuinfo