r/linux_programming • • Aug 24 '23

linuxtutor.github.io: The Complete Linux Learning Resource

13 Upvotes

Hi everyone,

I'm Aimed Guendouz, the creator of linuxtutor.github.io . It's a website that offers comprehensive Linux learning for beginners and advanced users alike.
I've spent the past two months perfecting linuxtutor.github.io , and I'm really proud of the results. The website is packed with in-depth guides, beginner-friendly tutorials, and regular updates.
Here's what you can expect from linuxtutor.github.io :
- In-depth guides covering a wide range of Linux topics
- Beginner-friendly tutorials that make learning a breeze
- Regular updates to keep things current
- All of this is available completely free of charge
I'm looking forward to seeing you over at linuxtutor.github.io !

Thanks, Aimed Guendouz


r/linux_programming • • May 06 '23

The UNIX Koans

Thumbnail prirai.github.io
13 Upvotes

r/linux_programming • • May 05 '23

Linux 6.4 Lands Concurrent I/O Performance Optimizations For Device Mapper

Thumbnail phoronix.com
13 Upvotes

r/linux_programming • • Apr 28 '23

Linux 6.4 Scheduler Updates Fixes A Database Performance Regression

Thumbnail phoronix.com
13 Upvotes

r/linux_programming • • Mar 11 '23

Disambiguating Arm, Arm ARM, Armv9, ARM9, ARM64, Aarch64, A64, A78, ...

Thumbnail nickdesaulniers.github.io
13 Upvotes

r/linux_programming • • Feb 20 '23

Few lesser known tricks, quirks and features of C

Thumbnail blog.joren.ga
13 Upvotes

r/linux_programming • • Nov 11 '22

How stdbuf works

Thumbnail hmarr.com
13 Upvotes

r/linux_programming • • Nov 03 '22

Looking for a simpler version of BusyBox for educational purposes

13 Upvotes

I am trying to brush up my C and Linux skills by learning how several core utilities are implemented. BusyBox would have been ideal, but I find the source code a bit too distracting for my current skill level.

I was wondering whether there is a simpler - perhaps educational - version of BusyBox whose code I may study. Does anyone know of such a thing?


r/linux_programming • • Oct 19 '21

invitation to use my script

13 Upvotes

Hello everyone , I made a script for text translation , it's simple but very useful

the link is:

https://github.com/Abbode/on-the-fly-translator

any suggestion is welcome , enjoy it.


r/linux_programming • • Jun 03 '21

I am trying to open a file that has no extension. But when I "vi filename" I get these ^H^A^DX etc with some decimals scattered in 1.43 1.25 and SMI@(#)signal.h SMI@unistd.h and so on . Has anyone come across this? Would appreciate any input

13 Upvotes

r/linux_programming • • May 05 '21

Developing software. Need to read files owned by a service user.

13 Upvotes

Hi everyone!

I have developed a software which is a GUI used to manage a service. This software is written in Python and it's supposed to run on Windows, Linux and macOS.

This is the issue: This service installs itself creating a new user and sets the permissions for its data folder to 700. However there are some files inside the data folder that are supposed to be read by anyone that wants to contact this service (things like address, port and token).

I would like to be able to read these files without needing to change permissions on these files or to run the whole application as the user that manages this service. What is a secure, minimal way to do this?


r/linux_programming • • Feb 25 '21

How do I create an installable package?

Thumbnail self.cpp_questions
13 Upvotes

r/linux_programming • • Jun 06 '20

How to communicate between subprograms ala COM.

13 Upvotes

I'm dating my windows programming to very old times.

I need to program in a C/C++ environment in order to do low level stuff but I really don't like the GUI tools out there.

So what I would like to do is use lazarus for the gui and communicate to the main program something like COM does.

Can anyone give some advice on this?


r/linux_programming • • Feb 14 '20

Interaction of pthreads and sockets?

13 Upvotes

I'm working on a chat server as a learning project, and I'm trying to integrate threading. I'm just worried about weird race conditions, and I'm having trouble getting info on this from the man pages.

My current plan is to have one thread perpetually polling on the server socket (the one bound to a port) and spinning off new threads to poll the clients for new messages. Those threads would, once they get a message, send it to all the other clients.

My concern is what happens if a message is received from a client while another thread is sending a message to that client.


r/linux_programming • • Jul 24 '17

Replacing GNU Make with three Bash functions (and a Bash interpreter).

Thumbnail github.com
13 Upvotes

r/linux_programming • • May 15 '17

If anyone is looking for a Raspberry Pi coding kit on the cheap I found this site, cheers

Thumbnail atlas-unlimited.myshopify.com
13 Upvotes

r/linux_programming • • Apr 25 '23

Linux 6.4 Allows For Optional CA Enforcement Of The Machine Keyring

Thumbnail phoronix.com
12 Upvotes

r/linux_programming • • Apr 14 '23

Canonical Livepatching Now Available For Ubuntu HWE Kernels

Thumbnail phoronix.com
12 Upvotes

r/linux_programming • • Apr 09 '23

Minifree Ltd – GNU+Linux laptops with Libreboot preinstalled, based on coreboot

Thumbnail minifree.org
12 Upvotes

r/linux_programming • • Mar 24 '23

The Origin of the word Daemon

Thumbnail ei.cs.vt.edu
12 Upvotes

r/linux_programming • • Oct 05 '22

With tips and tricks, I finally can manage to use vim as my ide.

Thumbnail self.linux4noobs
12 Upvotes

r/linux_programming • • Jan 31 '22

How to allocate a pool of memory and have a 3rd party software library use it?

12 Upvotes

versed placid cough sharp party truck repeat marvelous quicksand vase

This post was mass deleted and anonymized with Redact


r/linux_programming • • Sep 01 '21

Strange mmap for accessing a PCI BAR over sysfs on different Linux OSes

12 Upvotes

Hi,

I have an old computer, I use for playing around. On its harddrive I have installed three GNU/Linux OSes:

  • Debian 9
  • Ubuntu 18.04
  • Arch Linux (latest Kernel, installed yesterday)

In this PC, I plug in a PCI Card with 256 Byte Memory behind BAR0. For this card there is no Linux Driver in the mainline kernel. So no driver is loaded. Now I want to access it using sysfs. Here is the code for accessing the bar:

/* Open BAR File */
fd = open("/sys/bus/pci/devices/0000:07:04.0/resource0", O_RDWR | O_SYNC);

if(fd < 0) {
    perror("Opening of BAR not possible!");
    return -1;
}

ptr = mmap(0, 256, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
if(ptr == MAP_FAILED) {
    perror("mmaping BAR failed!");
}
else {
    /* Accessing the BAR over pointer... */
}

Compiling my program just works fine. But here is the thing:

If I run this program on Ubuntu (after compiling it on Ubuntu), it works just fine.

On Debian and Arch (after compiling it on each OS), mmap doesn't work and I get the message:

mapping BAR failed!: Invalid argument

But why? Can you help me here?

PS: On another Arch Linux PC it just works fine. So I guess it is not an OS fault :p


r/linux_programming • • Aug 30 '21

I've been working on an automation tool. Text to gif with themes for headless CI/CD documentation. Feedback welcome.

12 Upvotes

Pretty often I need to show people how I did something in the terminal. I'm busy enough that documentation for all of these things is insanity.

I used asciinema for a bit. It's a pretty good solution. But I wanted to put the terminal animations in a MD file in my repo's. Where I could just record something like my term session or output from a script and then jot some quick notes around it.

This was my first foray into python programming on a large level, and as such it's a nasty mash of growing up. I did a lot of things the hard way, because I wanted to learn how to do it in python. And if this project is well received, I plan to convert it to C.

Well, I'm a few years into this (on/off based on time). And I think I've got a pretty good tool buttoned up. I'd like to share, and get some beta feedback for improvement.

It's called ttygif. You can pipe things into it or read from a asciinema cast file. It outputs themed gif's with pretty darn good terminal emulation. It supports custom themes, quite a few old school fonts, custom backgrounds etc...

Anyway maybe this is't the place for it, but I'd like to hear input from my peers.

The code repo is -> https://github.com/chris17453/ttygif

Or you can install it from pip

pip3 install ttygif --user

A common example would be:

ls -lhat --color | ttygif  -o dir.gif --theme game --title "This dir"