Linux - Reddit – Telegram
Linux - Reddit
776 subscribers
4.19K photos
207 videos
39.9K links
Stay up-to-date with everything Linux!
Content directly fetched from the subreddit just for you.

Powered by : @r_channels
Download Telegram
y're incredibly powerful.

# #5 - [Simple overrides with `unit.d` directories](https://unix.stackexchange.com/a/468067)

Have a unit installed by an operating system package, but you want to do some interesting things to it? The first thing everyone thinks is to just edit the `/lib/systemd/system/my-unit.service` file and go wild. But, this will be overwritten on an upgrade. OK, you might read a bit, and then copy it from `/lib` into `/etc`. That won't be overwritten. But now you've duplicated the unit, and won't get nice improvements from your packages. The solution? `/etc/systemd/system/my-unit.service.d/`! Using this directory, you can override small components of the unit file with your own values, for instance adding an `ExecPreStart` or a `Requires`. The above example uses the `systemctl edit` function, which automatically creates these overrides, but you can drop these files in manually too using your configuration management of choice.

# #6 - Targets - group services, mounts, etc. together

Target units are another really cool feature of Systemd. You've probably seen stuff like `Reached multi-user.target` in your boot logs, but you can of course create your own `targets` as well. Simply put, they group other units together. If two services and a mount are part of a target, the target won't be reached until all of them start, and you can, with a few modifications to the units - using `PartOf = mytarget.target` in the `[Unit]` section of the services/mounts - control all the services by stopping or starting the target itself, in the right order. Depend other services on targets as well for maximum control of the startup sequence. There's a ton of power here.

# #7 - `systemctl enable` and `systemctl disable`

This is a really basic one, but want to turn off a service or mount for a bit? Disable it! Want a service that is installed by default (such as `nginx`), but want to start it with `supervisord` instead and are getting a conflict? Disable it!

# #8 - PIDFile

A nice thing about Systemd is that you don't ever have to worry about PID files, including weird stale PIDfiles lying around and messing with your service startup. But still want one? You can still add one with `PIDFile=`.

# #9 - Sockets units can replace [x]inetd

The old style, "run a noscript on a socket connection" tool inetd and its modern successor xinetd can be replaced by [systemd `.socket` units](https://www.linux.com/blog/end-road-systemds-socket-units), bringing the ease of use and control of Systemd to your inetd services!

Those are the first 9 I can think of right now, but if you have any of your own cool systemd tricks, I'd love to hear them too!

https://redd.it/bsqar4
@r_linux
what's the best lightweight Linux distro OS?

my internal storage is only 27.5gb, and has a 4gb ram with 1.6ghz processor.
can anyone suggest the lightest+most function Linux Distro?

https://redd.it/bsqzls
@r_linux
No hope for open chips from lowRISC?

I just found out that lowRISC is [hiring](https://www.lowrisc.org/jobs/). But I aslo found out that lowRISC is not aiming to produce real hardware anymore! Now they are:

> developing and maintaining high quality, verified open source silicon IP

But that was the first hardware project I was so fascinated about! I was ready to gave them some money without return just to see a piece of open-source hardware being manufactured. And they intended to produce it [from the start](https://web.archive.org/web/20140827011745/http://www.lowrisc.org/)!

> lowRISC is producing fully open hardware systems. From the processor core to the development board, our goal is to create a completely open computing eco-system.

Their noscript was till recently:

> A fully open-sourced, Linux-capable, System-on-a-Chip

and now it is:

> Open to the core Enabling open source silicon through collaborative engineering of tools and designs

I am so disappointed.

https://redd.it/bst5jw
@r_linux
TuxClocker AMD version released for overclocking your AMD GPU

https://github.com/Lurkki14/tuxclocker

Features for this version are:

- GPU monitoring (list and graph)
- Overclocking
- Overvolting
- Change power limit
- Pstate editing
- Fan mode selection
- Custom fan curve (root required)
- Provisional multi-GPU support
- Profiles

The AMD version is currently a separate codebase from the earlier versions, so the AMD version only works with AMD GPUs. I'm working on a new, more flexible version supporting nvidia and AMD.

https://redd.it/bsupzo
@r_linux
Systemd vs init noscripts, an essay



Reading the other post about Systemd made me want to write this.

​

Two things to understand about the below, 1) I am OLD for a Linux admin, almost 60 years old, I have been doing this for a long time, almost 30 years. I learned SunOS at an ATT training center that supported CompuServe, that kind of old. 2) Boring old man ramble: I remember arguing with people that hated anti-lock brakes back before some of you were born. I remember guys telling me, straight faced, that "No machine can brake as well as I can", "I can stop the car better than the software". They were wrong, but having a skill you value obsoleted by a chunk of code is a bitter pill to swallow.

All that being said and understood. Systemd frustrates me because I want it off my damn lawn. I see the benefits, but the having to google how to use it is frustrating for a senior admin (in both senses of the word) to have to do. We are being forced by regulators to update to RHEL 7 and that is forcing me to interact with systemd. I am learning, but lord it reminds me of every overly convoluted noscript a junior coder has ever written, and that’s the rub. It LOOKS like it over complicates what, at its core, is a simple idea. I just want to start f\*\*king NFS, damnit. I am beginning to understand and appreciate the benefits, but God I wish it was simpler.

Init noscripts time is over. They need to go for a lot of reasons, but forgive me for being glad that I will retire before they are completely rolled out.

https://redd.it/bsunzw
@r_linux
Linux resource for noobs (Linux Journey)

While attempting to help someone who was helpless in the end and didn't want to learn anything, I came across this link:

https://linuxjourney.com/

After running through a few parts of this simple website, I thought it would be useful for people who want to go beyond the gui and learn some command-line basics and how to manage simple services such as logging, ssh, file-sharing, and web.

Who ever created this site, nice job.

https://redd.it/bsy6g6
@r_linux
Linux desktop system wide scroll speed setting still missing

I've been a casual Linux desktop user for the last 5 or so years, most of my time is spent on server environments and cli.

Just installed Linux on a laptop and tried two different desktop environments. Both were still lacking system wide mouse scroll speed settings. This was the case also years ago when I first dabbled with Linux desktop.

Why hasn't this (pretty basic) functionality been implemented more commonly yet? Are there functional packages to remediate the problem? Is there something preventing this implementation?

https://redd.it/bsznat
@r_linux
Any Samba users here? I want to set up private folders for individual users?

I am creating an Ubuntu server for my house that will be used to store Windows File History backups from a number of Windows PCs. I have set up Samba before, and it worked well.... but the Samba shares were public for all PCs in my household.

​

Is it possible to create a server folder that is private for each Windows user? For example, I want User1 to have their own server folder, and I don't want User2 or User3 to be able to access that folder. Same goes with all users. I can then point Windows File History to do automatic backups to these private folders per machine.

​

Can someone point me to a good website or tutorial that I can study up on?

​

Thanks!

https://redd.it/bt1jpu
@r_linux
Partitioning Tip for Dual-Boot Systems

Over the years, I added various drives (HDDs and SSDs) to my system. It became an absolute mess. Recently, I settled on what I think is best. I use linux as my main operating system.

​

1st drive - SSD (preferably 240GB min)

Windows. Save \~20-40 GB at the end of the disk for Linux's / partition. My Kubuntu install is about 13GB with software installed. The more you can allocate the better as /tmp is going to be located in this space.

​

2nd drive - Larger HDD

/home partition. Most browser cache files are going to be written here. I don't notice any slowdown from having the .config files on the hdd.

​

My desktop has been using this setup for a while. One major convenience is not having to shuffle files around if formatting the linux OS (especially as it's the one more likely to break due to my tinkering).

​

I just bought a hdd caddy to replace the DVD drive to set my laptop up in a similar way. From what I've researched, SSHDs have high failure rates (was tempted by a 2TB sshd).

​

If I had only windows on the machine, I'd probably do similar. OS + Programs on SSD, moving libraries to a different HDD. (Instructions below)

[https://www.pcworld.com/article/2079571/move-your-libraries-to-a-second-drive-or-partition.html](https://www.pcworld.com/article/2079571/move-your-libraries-to-a-second-drive-or-partition.html)

​

If you have any suggestions, thoughts or experience, I'd love to see how others configure their systems.

https://redd.it/bt2o22
@r_linux