Conversation

the agaric system

vent, request for help
Show content

i wish i knew how to systemadmin and like, generally knew stuff about how linux (and all computers) worked, but everywhere i go i get a different answer. first i got “oh try hosting akkoma” then i got “try hosting nextcloud” then i asked someone who hosted nextcloud and they were like “don’t do that try hosting ngnix” and i don’t know what to do or where to go. half of the time when i ask someone where they learned what i wanted to learn they go “when i had a question i wanted answered i looked it up” and then when i say “but i don’t know what questions i need to ask” they have no answers for me and i’m stuck back on square one and i’m really fucking tired of being on square one.

1
0
1
re: vent, request for help
Show content

sorry folks

1
0
0
re: vent, request for help
Show content

i still want someone who knows things to help but i get why they maybe wouldn’t want to

1
0
0

@shroomie I was stuck on this part, we all started somewhere when it comes to system administration. Namely, I started my linux experience out by installing ubuntu 14.04 on my desktop because windows kept bluescreening. What you’ll want to do is find a starting point, something that you can use to learn how to troubleshoot. If you want to learn more about Linux there’s nothing wrong with picking a “beginner” (side note: I hate that term because yeah sometimes I literally just want a stable system I don’t have to constantly tinker with and deal with broken things) distro. So, what part of Linux is interesting to you I would ask. If you don’t know where to start the first place I would recommend is learning about the package manager on your distribution. You’re going to be using it a lot anyway, and it’s easier to get that off the bat. For example, if you pick a distribution based off of Debian or ubuntu (keep in mind that ubuntu is not exactly just a derivative of Debian that is misinformation) I would recommend learning about the difference between dpkg and apt.

Questions I would tell you to look up first, “How do I update my system via the command line?” It’s not always as simple as just man apt although that is a way to look at it. What is the difference between apt upgrade and apt dist-upgrade for instance. Looking at the various flags and figuring out what they do. Familiarize yourself with some of the common things between *nix like operating systems. Do something like ls -al / ask yourself, what is /usr? What is /var? what is /opt? Familiarize yourself with some of these common directories. You’ll need to know about the filesystem layout regardless of system. What’s the difference between /usr/bin and /bin? What’s /sbin? Just small questions like that can go a long way. It’s getting used to being curious about the system that’s the learning curve imo. Deploying nginx is only really going to teach you deploying nginx. If you follow the wiki you’re not going to get into things like “Hm, what is a service account?”. Do something like explore /etc/passwd. Look at the various accounts there. You’ll get into questions like “Should I run nginx under its own account and group such as nginx:nginx?”.

Look at permissions, ask yourself what is chmod? What is a mask. How does linux handle filesystem permissions across filesystems. What’s the difference between chmod 755, chmod 777, chmod 644? Using man pages can be daunting, getting into the habit of going man chmod or whatever other tool is a good one to get into even if you’re going to google the question. Explore various configurations on the system, what’s in /etc/profile.d? What’s in /etc/skel (I’ll link this one because it’s relevant to almost all of these questions https://www.linfo.org/etc_skel.html). How do I create users on my system? What is usermod -aG? There’s a variety of things you can do to explore and find “rabbit holes” that give you more questions to ask, utilize these to learn more about your system.

3
0
1

@shroomie@seafoam.space when it comes to deploying services, find yourself deploying things that are convenient to you to use. It doesn’t do you any favors to deploy nginx if your goal is to just deploy a static site and move on to the next thing. Part of homelab in my experience is self hosting software that I use. Take something like https://github.com/toptal/haste-server for instance, a self hostable pastebin. It’s pretty simple to deploy in a docker container. You can use this in combination with a domain to get into basic reverse proxy stuff. Let’s say you get a cheap domain, you go "hm. I want to have https for it". What’s the approach for that? You can renew your certs manually or use something called ACME. A protocol used to automate cert renewal. You get to automating it when you go "hm, this is tedious to keep up with my cert renewals. I wonder if I can automate it". Figure out things like "hey I want to host another service on the same IP” you go from using a simple tool like certbot for this one service to going "hm, I wonder if there’s a tool that lets me have services on subdomains & that automates cert renewal". Part of it is just being in groups that openly talk about their systems.

Now that I’ve talked about reverse proxies I’m sure you’re interested in learning the other ones.
https://traefik.io/ Traefik is nice (if you have someone who you can ask various things about it) especially for docker environments. I configure my docker containers with Traefik via tags. It does a majority of the config for me when I write my config in my tags and do docker compose up. What is docker compose? Find yourself asking questions to get to what you want to do. What are containers? What’s the difference between podman, docker? Why would containers be useful? Etc. so many small things that are super hard for people to get into unless they have an end goal.

1
0
1

@shroomie@seafoam.space also don’t be afraid to ask people like me or other people about various things. A lot of us don’t talk about our configurations unless asked simply because it becomes less cool to us. I’ve been genuinely shocked at the times I’ve asked what were fairly trivial questions to someone who was my "idol" or a lot more prestigious than me and they answered it without any hesitation, guiding me through it. I mean genuinely I’ve talked to people like briankrebs@infosec.exchange on here. I’ve talked to foone@digipres.club. Fedi is really cool because it removes that sort of celebrity disconnect. I feel a lot more comfortable talking to these "big tech" celebrities.

1
0
1

@shroomie@seafoam.space it’s one of the things I absolutely love about fedi. I’ve talked with @stefano@mastodon.bsd.cafe several times about how genuine tech interactions feel. I don’t get that fear of being judged or talked down to. I mean it still happens but it’s a lot less prevalent around the tech communities I find myself in here because we all start from somewhere. No need to dissuade people from asking questions and learning by being elite or assuming knowledge not everyone has. Lots of cool people around who would love to tell you a thing or two that you can use. I have clips of posts Stefano boosts related to FreeBSD & OpenBSD since some of the stuff I didn’t know about before. It’s nice here :)

2
0
1

@puppygirlhornypost @stefano @shroomie we don't judge because somebody helped us when we didn't know

0
1
1

@puppygirlhornypost the fedora docs say that i should backup my stuff before i update my system, but like, i have nowhere to back my data up, should i try to find a place anyways?

1
0
0

@shroomie@seafoam.space I mean if you want. It depends on how important the system is to you. If you store your configurations elsewhere or you can rebuild it then I don't see the point in backing up system files. Maybe your home directory, some configurations like nginx but not all the binary packages.

1
0
1

@puppygirlhornypost yeah my system is very important to me and i don’t think i could recover anything

1
0
0

@shroomie@seafoam.space i'd recommend finding a place to back it up to, what settings did you pick when installing fedora? (might make it easier)

1
0
1

@puppygirlhornypost note: i have nothing to back my thing onto

1
0
0

@puppygirlhornypost what exactly does ls -al do? i can’t seem to find “-al” as an option in ls’ manual

3
0
0

@shroomie

Let’s say I have a directory. (I legit just created a directory using some bashisms)

mkdir -p test/{one,two,three} creates the following

test is the top level directory, so when you run ls test you get one three two for each thing in the directory. When you provide -l to ls that tells ls to do it in “list view”. List view is a bit more verbose (it’ll provide permissions for everything. It changes it from shorthand to

total 12
drwxr-xr-x 2 amber users 4096 Jun 25 11:51 one
drwxr-xr-x 2 amber users 4096 Jun 25 11:51 three
drwxr-xr-x 2 amber users 4096 Jun 25 11:51 two 

this just shows the permissions (drwxr-xr-x is a bit hard to understand here, but essentially that’s just a short hand for the permissions applied to the file.) It shows me that these are owned by the user amber and owned by the group users. The numbers on the side are the size it takes on disk, which you can convert to human readable via the flag -h

total 12K
drwxr-xr-x 2 amber users 4.0K Jun 25 11:51 one
drwxr-xr-x 2 amber users 4.0K Jun 25 11:51 three
drwxr-xr-x 2 amber users 4.0K Jun 25 11:51 two

So now with that, let’s explain what -a does. The -a stands for all. It will show hidden files, such as “..” which is a placeholder to navigate the directories. Typically on *nix systems if you start a file/directory with a . it is marked as a hidden file/folder by default. It won’t show up in ls normally since by default ls does not display hidden files/directories.

total 20K
drwxr-xr-x  5 amber users 4.0K Jun 25 11:51 .
drwx------ 40 amber users 4.0K Jun 25 11:51 ..
drwxr-xr-x  2 amber users 4.0K Jun 25 11:51 one
drwxr-xr-x  2 amber users 4.0K Jun 25 11:51 three
drwxr-xr-x  2 amber users 4.0K Jun 25 11:51 two
3
0
1

🎄 lily 🏳️‍⚧️ flag_pansexual flag_ace θΔ ⋐ & ∞

@shroomie @puppygirlhornypost usually in unix commands -al would mean -a and -l
so -a is all files including . ones, and -l is show a table with stats (list), not a “list” in wide format

1
0
2

@shroomie@seafoam.space I forgot to mention, in each of those examples I added the flags on. So the commands in order to recreate this would be

ls -l
ls -lh
ls -lha

I really like *nix tooling that allows you to combine short hand flags like this, it makes it easier to write in my terminal compared to something like ls --all -l --human-readable (yes those are the expanded versions of the shorthands)

0
0
1

@shroomie @puppygirlhornypost when you see a command line flag like that one, in the form of single dash followed by multiple letters, it usually (with some uncommon exceptions) is shorthand for multiple short flags. so ls -al is equivalent to ls -a -l

0
0
2

@shroomie @tauon @puppygirlhornypost also if u have any linux/sysadmin questions you can ask me btw, i accept questions from everyone

0
0
2

@shroomie@seafoam.space no {one,two,three} may not work on some shells (I haven't actually bothered to check). I just figured better safe than sorry. mkdir is part of coreutils, -p just stands for parent. makes the parent folder test before evaluating the subfolders. it's useful, you can stack it to quickly organize things.

mkdir -p /docker/{compose,logs,data}/{service1,service2,service3}

i prefer just having my docker/env folder as just a list of .env files without the name. you can see how easy this becomes to "automate" what's otherwise kinda tedious.

1
0
1

@puppygirlhornypost this is a little much for me to understand

1
0
0

@shroomie@seafoam.space shell expansion is a very interesting topic, not something i'd recommend you start off with. Though if you're ever curious there's tons of resources on the topic I'm sure I could pull up.

1
0
1

@puppygirlhornypost how in the world did do a shell expansion, what even is that? i just created folder in my documents folder with three subfolders

1
0
0

@puppygirlhornypost is “directory” not a synonym for “folder”?

1
0
0

@shroomie It is. Sorry, I should clarify here. By shell expansion, your current shell is taking the brackets and performing a modification to them. https://www.howtogeek.com/725657/how-to-use-brace-expansion-in-linuxs-bash-shell/ if you want to read more. The reason I used it in the mkdir example was to simplify the amount of commands you’d have to run if you wanted to recreate my example. Instead of running something like

mkdir test
mkdir test/one
mkdir test/two
mkdir test/three

what mkdir gets is not {one,two,three} it gets mkdir -p test/one test/two test/three which is why it’s called “shell expansion”.

2
0
1

@shroomie@seafoam.space A "Bashism" if you will, is just a term referring to syntax bash (and bash alone) does. Bash has several weird syntaxes that are incompatible with shells such as fish. I said the word "Bashism" because some *nix systems do not run bash. I actually run a shell called zsh (Z-Shell) which has compatibility with bash specific syntax. I like zshell because it's a lot more customizable with third party software. When I press the tab key on my shell with a shell expansion such as {} it will give me the full expanded variant before I run the command.

3
0
1

@shroomie@seafoam.space This is actually how I gave you the previous tidbit regarding what {} expands to. I just pressed tab as if I was gonna run the command, copied the transformation.

0
0
1

@puppygirlhornypost hey, thanks amber! i had gotten stuff that looked more like mkdir -p test/one test/two test/three when i looked up what mkdir -p did specifically

1
0
0

@puppygirlhornypost @shroomie Bashisms don’t refer to incompatibilities with non-POSIX shells like Fish; they refer to features that are in Bash but aren’t in POSIX. POSIX features that aren’t in Fish aren’t considered Bashisms.

2
0
1

@shroomie Having something to evaluate what your expansion is going to do is really handy when it comes to wildcard expansion & rm specifically. There is a difference between (do not run these commands, these will irreversibly destroy your system) rm -rf / and rm -rf /*.

I will provide the expansion for my system in particular (nixos 24.05)

rm -rf /* turns into rm -rf /bin /boot /dev /etc /home /lib /lib64 /lost+found /mnt /mnt2 /nix /proc /root /run /srv /sys /tmp /usr /var while rm -rf / (in theory) should be safe to execute. The gnu coreutil variant of rm will warn you, prohibiting a forceful recursive delete on the parent of your filesystem. This only happens if you pass it / directly though, if you use a wildcard there rm behaves differently. the protection is bypassed and rm will happily recursively delete all of the folders & files on the filesystem as long as it has permission to do so.

0
0
1

@Seirdy@pleroma.envs.net @shroomie@seafoam.space True! sorry. I should specify that. There is a difference between a posix compliant shell and a shell that does not aim to be posix compliant.

0
0
1

@puppygirlhornypost @shroomie POSIX specifies, among other things, the lowest common denominator between all the POSIX shells: Bash, Zsh, Dash/Ash, the OpenBSD sh, etc. Fish is kinda doing its own thing. Recent POSIX features added to Fish were done to reduce the learning curve but not make it compatible with PSOX scripts, AFAICT.

2
0
1

@Seirdy@pleroma.envs.net @shroomie@seafoam.space yeah posix shell is just a compatibility thing, you can pretty much guarantee that if you're writing in purely posix shell that any posix compliant shell will execute the script in the same manner. Bashisms are just extensions, I mean hell I'm sure all the other shells have their own variant of quirks. I forgot that fish does not try to be posix lol. I guess a better example would be the difference in what you can execute with /bin/bash and what you can execute with let's say busybox's ash on /bin/sh.

1
0
2

@puppygirlhornypost @shroomie i forgot that busybox sh is ash. so i technically have two distributions of ash on my system (busybox ash and dash) woag woaa

0
0
1