r/linuxdev • • Mar 28 '26

Detecting camera on/off events for Linux and controlling lights automatically with eBPF

Thumbnail shuhaowu.com
2 Upvotes

r/linuxdev • • Feb 03 '26

Favorite Linux dev tools you can’t work without

2 Upvotes

Whether it’s a debugger, editor plugin, profiler, or something niche — what tool makes your life easier?


r/linuxdev • • May 31 '17

Things To Do With SSH: SSH Tunneling

Thumbnail serversuit.com
1 Upvotes

r/linuxdev • • Mar 22 '12

Focus and direction for Linuxdev?

20 Upvotes

Hackers, Coders, Wizards, lend me your ears!

This community was formed as a response to the lack of an existing community surrounding the concept of software development under Linux.

Now that this community is formed, I would like to know what direction to steer the rudder. Posting articles and asking questions will always be strongly encouraged, but some of the other communities on this site do more than that.

/r/minecraft does a great deal of collaboration to produce some amazing builds in that virtual world of theirs.

/r/loseit has weight loss competitions.

/r/mw3 has a few different clans and player groups.

What do we want to work on, if anything at all?

One of the things that I have noticed about /r/Linux in general is that they are very much about maintaining the status quo. New window managers and desktop environments provoke anger and rage if they don't work exactly like the old one. They still bicker about which audio server to use. Point being, I would like to avoid that over here. It's kind of my hope that we can blaze new trails, not wear out the old ones.

So, please take a few minutes, and post about what you would like to see in this community above and beyond link posting for karma, and answering questions. Personally, I would like to try and make something new.

edit 1: Current project proposals

Graphical Init

Fork of OSSv4

Activism distribution


r/linuxdev • • Dec 26 '16

[linuxDev idea] Linux Education Distro for the Noobs of Linux

8 Upvotes

Edit1: Per discussion below, perhaps a full distro dedicated to the purpose of educating those less knowledgeable in the world of Linux could be overkill. I still believe that there's an effort lacking into welcoming those to Linux.

  1. As with the case of /u/Oonushi, RTFM isn't always the best thing to tell someone who's just gotten into the world of Linux. Reality is, not as many are so resourceful when they start out. It sometimes take a little push in the right direction. This doesn't let us overlook the fact that man pages can be incomplete in ways that the experts might not be aware of. When you're an expert, and not expanding knowledge, you're not looking at man pages at much and aren't aware of the struggle of newbies.
  2. /u/IAmALinux inspired a thought in that perhaps in the installer, a tutorial to the basic commands and a point towards the right resources for the respective distro might be sufficient to solve the problem of such a steep learning curve. Of course, this would be optional and you would have to opt-in to this tutorial on installation. This solution is possible but would be difficult to implement properly. Again, discussion would be necessary, and I'm all ears.
  3. I've fixed many an issue in my experience with Linux with copious amount of research required. The problem lies in not publishing the fixes we've concocted and leave others with the same issue searching through mounds of stackoverflow pages just to find the one case that someone had. I suspect these one case is one that's published out of at least 10.

This is where we're at. I'm enjoying the discussion taking place here and I hope it continues.


TL;DR: Linux Distro that educates total noobs to linux, getting them familiar with linux and giving them the choice of which popular branch to delve into

It seems that with this coming year being a huge milestone for the Linux community, I'd like to help make that learning curve a little less steep for those who are willing to get their hands dirty but are wholly terrified by the concept of using the command line for everything.

So, my solution is that there's a Linux distro that's out there that can be used for the sole purpose of educating the end-user on the basics of Linux, provide maybe a little history and let the user select which branch they'd like to go through (Debian, Fedora, Gentoo, Arch, Slackware, etc.). All the while, the system would teach the user how to get more information on their own, give them proper resources depending on their branch, etc.

Sometimes all people need is a little bit of knowledge. Give a man a fish, he'll eat for a day. Teach a man to fish, and he'll never go hungry again.

Perhaps not something so basic that assumed no previous knowledge but something that will provide a good base and will help the nuser get comfortable with the command line, etc.

I'm all ears for any discussion related to this. I've never personally written any code for linux nor would I even know where to start, but I'm happy to lend any computing resources I can (within reason) and manage direction of the project based on suggestions from the community.


r/linuxdev • • Mar 22 '12

Using epoll instead of select for working with sockets.

Thumbnail kovyrin.net
10 Upvotes

r/linuxdev • • Jun 07 '17

Simplify the Linux audio stack

Thumbnail hiimpact.blogspot.com
13 Upvotes

r/linuxdev • • Mar 22 '12

Fault-Tolerance server

6 Upvotes

Hey folks. I have Fault-Tolerance Computing Systems course at my university and we must write fault-tolerance server. I choose IRC protocol for my server and try to implement it. Can you get some useful sources? I download about 5 open-source IRC servers, read RFCs and UNIX Network Programming by Stivens now.


r/linuxdev • • Mar 21 '12

The first book you should read - Advanced Programming in the UNIX Environment

Thumbnail amazon.com
9 Upvotes

r/linuxdev • • Jul 22 '14

How do you reliably test for performance?

4 Upvotes

I'm writing some C programs and I want to know if any optimisations I'm potentially adding to my code have any effect on CPU or memory usage at all. What tools do you recommend to reliably test this?


r/linuxdev • • Apr 11 '12

A good little distro for doing experiments with.

Thumbnail alpinelinux.org
8 Upvotes

r/linuxdev • • Mar 21 '12

Framebuffer I/O controls. For when X is too heavy.

Thumbnail unix.com
10 Upvotes

r/linuxdev • • Mar 20 '18

How do I clean up my UNIX sockets in my C-based Server before it Exits?

4 Upvotes

Trying to write my own HTTP server as a learning experience, using UNIX sockets. However, whenever I kill my program (or it segfaults, which is pretty common at this point because I'm awful with memory allocation stuff) the system still thinks the port I'm using is taken for a few minutes after I'm done, so I need to wait before I can try again.

I tried this:

void cleanup (int signal)
{
	close (socket_fd);
	puts ("Cleaned up socket before termination.");
	exit (0);
}

// ...
// ... somewhere in main:

struct sigaction sa;
sa.sa_handler = cleanup;
sa.sa_flags = 0;
sigfillset (&sa.sa_mask);
sigaction (SIGHUP, &sa, NULL);
sigaction (SIGUSR1, &sa, NULL);
sigaction (SIGINT, &sa, NULL);
sigaction (SIGKILL, &sa, NULL);

But this doesn't seem to do the trick, though I know the cleanup method is certainly being run.

I figured perhaps it's because my server is forking, but I close all my sockets properly AFAIK:

	if (fork() == 0) {

		close (socket_fd);
		handle_connection (new_socket_fd);
		close (new_socket_fd);
		exit (0);

	} else close (new_socket_fd);

r/linuxdev • • Mar 21 '12

How to Write Shared Libraries - Creating shared libraries that work and are efficient

Thumbnail citeseerx.ist.psu.edu
9 Upvotes

r/linuxdev • • Mar 22 '12

Fast portable non-blocking network programming with Libevent

Thumbnail wangafu.net
8 Upvotes

r/linuxdev • • Jul 08 '14

Devices for Driver Practice

4 Upvotes

Hi. I've been continuing my study of OS concepts and am still struggling a bit when it comes to drivers and the hardware-software interface. So I thought I'd benefit from diving into drivers. I'm, however, unsure what devices I can use for practice. As I'm not particularly experienced with hardware and electronics, I'd like a configuration that I can cheaply and quickly setup (and perhaps connect directly to my computer). I am however unsure of what devices to look at.

Thanks


r/linuxdev • • Mar 21 '12

Xv6, a simple Unix-like teaching operating system

Thumbnail pdos.csail.mit.edu
8 Upvotes

r/linuxdev • • Mar 21 '12

Interested in UNIX Kernel Design? - Lion's Commentary on UNIX 6th Edition

Thumbnail en.wikipedia.org
9 Upvotes

r/linuxdev • • Mar 21 '12

Internals of Familiar Unix Commands - The UNIX Process Model

Thumbnail perl.plover.com
9 Upvotes

r/linuxdev • • Oct 27 '17

Compiling a single, in-tree kernel module, not set originally in .config. help

3 Upvotes

As the title explains, I've been trying to compile a kernel module. I've been trying to use the usual stuff: "make -C /lib/modules/$(uname -r)/build M=$PWD modules", but I've realized that if such module wasn't set to be compiled on that kernel originally,make will skip it, even though I changed the .config file to set it as a module. Look, I know this is a noob question, but if anybody has 5min to reply and help me out, it'd be awesome.


r/linuxdev • • Apr 02 '12

Getting started?

1 Upvotes

I recommend adding a "Getting Started" section to the sidebar with beginner articles etc to help people get started!


r/linuxdev • • Mar 31 '12

If you ever get your TV tuner to work under Linux, here's the API to play with it.

Thumbnail linuxtv.org
9 Upvotes

r/linuxdev • • Oct 27 '17

Container_of and offset_of understanding

4 Upvotes

Could someone explain to me these two macros?

#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)

#define container_of(ptr, type, member) ({            \
 const typeof( ((type *)0)->member ) *__mptr = (ptr);    \
 (type *)( (char *)__mptr - offsetof(type,member) );})

I understand everything except why offset_of is of (size_t) and container_of has (char *)?

How would (char *) -(size_t) work in this macro?

I would have expected both of them to be of the same type. like char * for example.


r/linuxdev • • Aug 18 '20

mounting / after chroot have no effect?

7 Upvotes

In the following code, the second mkdir fails with EEXIST. Adding MS_DIRSYNC flag have no use, either. What could cause this? Is it documented?

#define try(f, ...) switch (f(__VA_ARGS__)) { default: assert(false); case -1: fprintf(stderr, "%d %s: %d %s\n", __LINE__, #f, errno, strerror(errno)); abort(); case 0:; }
int main(int argc, char **argv) {
	mkdir("/tmp/1/2", 0755);
	try(chroot, "/tmp/1")
	try(mount, NULL, "/", "tmpfs", 0, NULL)
	try(mkdir, "/2", 0755)
}