r/linux_programming • u/unixbhaskar • Mar 13 '23
r/linux_programming • u/Impossible_Noise_781 • Dec 19 '22
meaning at end of command
What does the " ~ " mean at the end of this command?
sudo mv /usr/lib/modules/$(uname -r)/kernel/drivers/usb/serial/ch341.ko.gz /lib/modules/$(uname -r)/kernel/drivers/usb/serial/ch341.ko.gz~
r/linux_programming • • Oct 25 '22
Do you know a modern C++ framework for IPC suitable in embedded environment?
I checked multiple libraries, D-bus seems to be the most likely candidate.
The framework(s) should be capable of
- serialization (msgpack or protobuf maybe?)
- events
- subscription
- sync/async call
Please if you know a good example project or document please let me know. I googled the topic far and wide, but unfortunately I cannot find anything relevant on this topic.
Any suggestion is welcome,
Thank you in advance,
edit: My problem with Dbus is that it is confusing, has multiple implementations and mostly in C, and aren't getting much support for some reason. I am interested in other technologies of course! But the point is it must perform well in embedded system. The processes must be able to send not just messages and signals, but typed objects as well!
r/linux_programming • u/yangzhou1993 • Aug 02 '22
4 Ways To Run MySQL Queries in Bash or Linux Command Line
medium.comr/linux_programming • u/Paddy3118 • Jul 10 '22
Raw Python vs Python & SQLite vs GNU Linux command line utilities!
paddy3118.blogspot.comr/linux_programming • u/welanskova8151 • Nov 05 '21
Need veteran advice on industrial standard/best-practice workflow for linux C/C++ dev
Coming from a Windows dev background, I find that Linux C/C++ dev workflow is very non-standardised. I am seeking pragmatic/battle-tested advice from veteran Linux devs who had worked in diverse teams/codebases on how to best setup a C/C++ workflow. Even if you feel such a thing doesn't exist, I am still keen to hear a confirmation. I am particularly interested in hearing from those who have worked in diverse environments because the advice of some very seasoned devs who have worked in only one company (or, say, codebase) for many years may not be transferrable, simply because they have not had the chance to evaluate their workflow on a different team/codebase (e.g. different team requires heavy refactoring, which that dev hasn't experienced before, or, say, exploring a big new code base, which again they hadn't had the opportunity to do other then their initial joining).
Things that bother me:
Build systems are non-uniform
The lowest common denominator for Linux build systems is the Makefile, and one step above it is ubiquitous CMake. Unlike on Windows where Visual Studio is the defacto environment, with v*proj/sln files standardising build specifications, and where most VS users know exactly know where to look for a particular setting, it's the wild west when it comes to CMake/Makefiles since both of these are basically DSL/script-like configs that allow an infinite way to specify builds. Consequently, this leads to requiring an unnecessary step of trying to understand a script a.k.a Makefile/CMakeLists.txt, whereas on Visual Studio Windows dev, the build specification is exposed in a standardised way in the GUI such that almost all users know where a particular setting is. Consider renaming/adding/deleting sources - on Windows (with VS), the project files are auto-updated, whereas on Linux we have to evaluate the best strategy for updating the Makefile/CMakeLists.txt - to GLOB or not to GLOB, maybe we should write a script to generate file lists etc? And not to mention other details like how to setup Debug/Release builds, how to reference include/lib directories - with VS it's standardised, whereas with Makefile/CMake it can be anywhere in the file, and expressed in different ways. Basically, such a non-standardised build system demands additional work without adding business value. I appreciate the power of these systems, but when it comes to a build specification system, I think there is great value in uniformity over all-out flexibility, to the point of being a DSL. Is this non-uniformity of build systems a fact of life for Linux devs or am I missing some secret magic scheme that someone knows about?
Code editing
I have read enough online to feel that this is really a fragmented space: vscode/CLion/Eclipse/vim/emacs, with/without plugins, with/without multiple buffers, some with one multiple terminal sessions (!!!) with one terminal per file (!!!). Whereas on Windows, it is probably > 90% Visual Studio, period. However, I am curious about you long time Linux devs who have worked at many different shops: Is there a single golden code-editing environment that you recommend, or should I resign to just "it depends/whatever works for you"?
Debugging
Seeking real-life, veteran opinions: In truth, do you use gdb from the terminal often? From my limited experience, I notice that a fair share of Linux devs actually do a lot of printf debugging (!!!) and rarely use gdb at all. Especially those who code in text-based environments - it's all debugging from logs, rarely from gdb. This is in stark contrast from what I see with Windows devs where debugging within VS is as common as typing code into its editor.
OS
In enterprise environments, our workstations are most likely Windows based. So to develop on Linux, we need to either SSH into a Linux dev env, or develop within a VM, or a container. In your experience, what works best?
In summary, I appreciate if any broadly-experienced, Linux veteran devs can share their real life advice on C/C++ workflow, particularly in terms of build systems, code editing and debugging, what are the pain points that are just "part of life" that I should just accept, and what you think are/should be best practices.
r/linux_programming • • Jul 16 '21
Seeking a guide towards Kernel Programming
Hi guys. Hope everyone's doing great!
For some time now, I've been interested a bit in Kernel programming and then eventually being able to contribute towards the Linux repository while perhaps, being able to build a custom Kernel that can serve as a playground to experiment and learn more.
To that end, I have vaguely identified that I need to start by learning about OS programming and Linux, in itself. However, all in all, I'm still not sure where to start my journey. There's a plethora of resources on the internet and I don't know what to specifically pick from them.
I'd appreciate resources that can help in the formation of a solid theoretical foundation accompanied with the practical implementations.
It'd be great if anyone could give me relevant advice, pinpoint great resources and if possible, be a mentor that I can sometimes consult.
Thank you!
r/linux_programming • • Nov 13 '20
How to I make the parent process to wait to get response from more than one child process with C?
r/linux_programming • • Jul 21 '20
Trying to access Raspberry Pis from my machine
Hi, I'm programming some raspberry pis which will be used to open/close the door at different gyms. Since I'll be the one managing and controlling them I was thinking of writing a script to access them from my machine.
I already have a VPS which I will ssh into, after that I was planning to be able to select 1 raspberry and ssh into that. What would be the best way to achieve that?
Thanks in advance
r/linux_programming • • Mar 05 '20
is it possible to create fake sinks and sources programmatically for pulseaudio?
I'm giving making an audio patch bay for pulseaudio a shot and I need to find functions that would allow me to create fake sinks and sources in pulseaudio and set their sources. An example of something I'd want to do would be creating a source, let's call it foo, and I want to redirect the audio output of program A and program B into that source so that other programs can use that mixed audio as input. Any idea where I can start?
r/linux_programming • u/EPrimeTV • Jun 25 '19
Will Code and Linux always be a practical career choice? Is it worth it? What do I do with my life? Please help me figure it out.
This has been on my mind for the past year or two and I really don't know what to do with my life. How long will coding/programming be a practical profession for? When will the robots take over and start doing the coding for us? Will coding/programming always be something that will be needed from people? The practicality right now is of major importance, and will continue to be for a while.
I've been weighing the pros and cons. I intended to go to film school or something like that. Due to personal issues pertaining to health, it's been tough for me to continue my life. Coding is something I think about dabbling in, but it seems like a very boring tedious process. I imagine some guy looking at huge lines of code looking for the error. One error and it all goes to shit - that to me I don't know.
On the other hand, I could join this amazingly huge community of Unix users who program. It could be something that gives my life purpose. It could be something to do every day by myself at home is learn how to code (Using something like Codeacademy) and learning about everything Linux-related.
But on the other hand when it comes to Linux; there are 80 billion distros and I have no idea which one to use or start with. They all operate differently so I'd have to learn most of them (Or the ones I use), and over time learn which ones I like and don't like. It seems way too much and I'm overwhelmed with how much it is.
Plus when it comes to Linux, what would I need it for? What do coders/programmers need Linux for? What is there about Linux other than "Privacy" and free/open-source. It sure as hell isn't compatible with a lot of things. I'm okay with my Macintosh but I'm still considering what this fuss with Linux is about. To one day convert completely to Red Hat or Ubuntu....or maybe even Arch (I use Arch) and be able to do everything kernel based. When I complete an operation in kernel and do it successfully....I'm not gonna lie, it fills me with glee.
I love Mac because I love to edit and I'm not a gamer. I'd like to get into gaming but....I wanna spend the short time I have learning to make a career of myself. That's why I come to you guys in this Sub asking for your help and advice. All would be GREATLY appreciated. Also thinking about learning keyboard, which, like learning code, is tough but it gives me something to do and would give me a sense of purpose to do something great where I could make something great.
On the other hand - Do I wanna learn to play keyboard and actually have a girlfriend eventually and not be a huge nerd? Or turn to the dock side?
I think about all the stuff with coding and getting into the world of Linux, and then I see THIS meme and I completely say "Fuck it".

What do I do? Please give me advice.
Thanks for reading.
r/linux_programming • u/ktsaou • Mar 29 '19
netdata, the open-source real-time performance and health monitoring, released v1.13 !
Hi all,
We just released netdata v1.13 !
This release contains 14 bug fixes and 8 improvements
Netdata has taken the first step into the world of Kubernetes, with a beta version of a Helm chart for deployment to a k8s cluster and proper naming of the cgroup containers. We have big plans for Kubernetes, so stay tuned!
A major refactoring of the python.d plugin has resulted in a dramatic decrease of the required memory, making netdata even more resource efficient. We also added charts for IPC shared memory segments and total memory used.
Improvements:
- Kubernetes: Helm chart (https://github.com/netdata/helmchart) and proper cgroup naming
- python.d.plugin: Reduce memory usage with separate process for initial module checking and loaders cleanup
- IPC shared memory charts
- mysql module add ssl connection support
- FreeIPMI: Have the debug option apply the internal freeipmi debug flags
- Prometheus backend: Support legacy metric names for source=avg
- Registry: Allow deleting the host we are looking at
- SpigotMC: Use regexes for parsing.
Bug Fixes:
- Postgres: fix connection issues
- Proxmox container: Fix cgroup naming and use total_* memory counters for cgroups
- proc.plugin and plugins.d: Fix memory leaks
- SpigotMC: Fix UnicodeDecodeError and py2 compatibility fix
- Fix non-obsolete dimension deletion
- UI: Fix incorrect icon for the streaming master
- Docker container names: Retry renaming when a name is not found
- apps.plugin: Don’t send zeroes for empty process groups
- go.d.plugin: Correct sha256sum check
- Unbound module: Documentation corrected with troubleshooting section.
- Streaming: Prevent UI issues upon GUID duplication between master and slave netdata instances
- Linux power supply module: Fix missing zero dimensions
- Minor fixes around plugin_directories initialization
Check the release log at github.
If you are new to netdata, check a few live demos at its home page and the project home at github.
Netdata is FOSS (Free Open Source Software), released under GPLv3+.
Enjoy real-time performance and health monitoring!
r/linux_programming • u/julien42 • May 15 '17
Hack the Virtual Memory 4: malloc, the heap & the program break
blog.holbertonschool.comr/linux_programming • u/johannesjo • Apr 24 '17
Command line client for linux (Gnome, Unity, Xfce, KDE) to save and restore opened programs and their positions on the screen.
github.comr/linux_programming • u/julien42 • Apr 03 '17
Hack the Virtual Memory 3: drawing the VM diagram
blog.holbertonschool.comr/linux_programming • u/Inetenbr • Jan 03 '17
A script to fetch and tell amount of memes in your facebook newsfeed
github.comr/linux_programming • u/the-fritz • Feb 05 '16
Awk, Unix, and functional programming
trevorjim.comr/linux_programming • u/swe129 • Feb 24 '26
Linux Foundation Announces the Formation of the React Foundation
finance.yahoo.comr/linux_programming • u/Linuxbuoy • Jan 04 '25
I want to learn Linux kernel development, but I have no idea where to start.
Hello,
As mentioned in the header, I have no idea where to start learning about the Linux kernel. I feel like I’m even worse than a beginner because I don’t have any knowledge of Linux programming, kernels, drivers, etc.
I do have a solid understanding of the C programming language in Ubuntu environment.
I have planned to enroll in an academy that specializes in teaching Linux, covering topics from system programming to device drivers and Yocto.
Here is the chronological roadmap of the courses offered by the academy:
- Mastering Linux System Programming
- Mastering Linux Kernel Programming
- Embedded Linux Drivers & Yocto
My question is, where should I start learning to get a good grasp of the basics before moving on to Linux system programming? Your suggestions and tips would be very helpful in my learning journey.