Episode #125 of the Stack Overflow podcast is here. We talk Tilde Club and mechanical keyboards. Listen now

Questions tagged [linux]

LINUX QUESTIONS MUST BE PROGRAMMING RELATED. Use this tag only if your question relates to programming using Linux APIs or Linux-specific behavior, not just because you happen to run your code on Linux. If you need Linux support you can try https://unix.stackexchange.com or the specific Linux distribution's Stack Exchange site like https://askubuntu.com or https://elementaryos.stackexchange.com/

Filter by
Sorted by
Tagged with
0
votes
0answers
6 views

improve Linux kernel API

I found a issue that after linux kernel 4.15,linux kernel struct timer_list have removed the member "data" ,so a compile error happened.when I build the code on Ubuntu 18.04. the error code is the ...
0
votes
0answers
10 views

Unable to to switch to super user after upgrading sudo

I have an ubuntu 14.04 machine whose version is NAME="Ubuntu" VERSION="14.04.5 LTS, Trusty Tahr" ID=ubuntu ID_LIKE=debian PRETTY_NAME="Ubuntu 14.04.5 LTS" VERSION_ID="14.04" HOME_URL="http://www....
0
votes
0answers
7 views

Original files remain after running the rename function in PHP : Why it worked before : NFS mounted

Currently, I'm investigating the problem of original files remaining after running the rename function in PHP. The program is simple and has moved to a temporary folder.(in PHP with FuelPHP) \File::...
0
votes
0answers
10 views

Why RSS is not reduced when calling free

I am creating a program that malloc a good amount of memory, then free. when I check the RSS from /proc/{pid}/status, at the first few try it shows the RSS reduce when the memory is freed. but after ...
0
votes
0answers
7 views

Gaming with XDMCP (Linux)

Long story short, I've got an awesome screen with burnt out HDMI ports but the VGA works, only my gaming desktop doesn't have VGA so I've got an old laptop connected to it. My plan was to use it as ...
-1
votes
0answers
42 views

What is a good method for implementing a memory-efficient, disk based hash table? [on hold]

I'm in the proccess of making a C console program for my college course, which manages some vet medical records, by storing them in structs written into a binary file. The assignment requires me to ...
0
votes
1answer
12 views

chaining build targets in Makefile and maintaining order of execution

I have a Makefile defined loosely in the following way pre_build: cp build/Dockerfile . post_build: echo "complete" rm Dockerfile build_docker: echo "do something with the ...
-1
votes
0answers
21 views

Why is ping slow on domain solving? [on hold]

Why this big difference in times if the domain name is resolved by ping itself, versus resolving it using getent externally? $ time ping -c1 "google.com"" 0% packet loss 0m5,064s $ time (ip=$(getent ...
0
votes
2answers
30 views

Linux scripting to get count of string pattern from folders and subfolders

I have a folder and it has folders and sub folders. This folders and subfolders contains files like input_abc.txt input_def.txt pattern1 is 'RCA' pattern2 is 'RSA' Folder strusture: Folder -...
-1
votes
1answer
14 views

NMI watchdog messages, ie. 'Shutting down hard lockup detector on all cpus'

When NMI watchdog has been "disabled" it is still chatty. Does anyone know where the docs for these messages live? I'd like to see what is actually happening. For example, verified that it is ...
0
votes
0answers
18 views

I don't know why Nginx server is not working

Hi there i'm trying to put in production some django app using nginx + gunicorn + supervisor. Following this guide i was able to reproduce all steps with success but for some reason i can't make it ...
-1
votes
2answers
18 views

I can't create a virtual environment set only to python3 in ubuntu

When I want to create a virtual environment with python3 (well python3.6 to be more precise) it keeps installing both python version even when I explicitly stated for it not to. I used the command: ...
-1
votes
1answer
17 views

Default python launches even after installing anaconda

I have installed anaconda latest version in my LINUX MINT and it's expected that the ANACONDA version of python to launched when I type python/python3 on the terminal but it only start the default ...
-2
votes
1answer
14 views

How to make a Programm written in jdk12 on windows over intellij and compiled to .jar run in Linux with openJDK

i have developed a small server, which works perfecctly in windows. i compiled this to a .jar file and pushed it to my linux server. I am unable to run the programm because of a version error. i found ...
0
votes
2answers
27 views

SIGINT ignored while calling system(3)

I have a process with a thread that calls for example: system("ping -qnc 1 192.168.1.1") in a loop. When I do CTRL +C, SIGINT is ignored as per the documentation: During execution of the command, ...
0
votes
1answer
16 views

Build separate lists of matching and non-matching files

<NAME = $$WORK_STUDENT GEN=123 VARIABLE=EXEC > I want to search for files that contain the line above and save the matching files in found_list.txt and and non-matching files in notfound_list....
0
votes
1answer
27 views

Linux kernel bug? Create new socket defaults to non blocking

For a simple TCP Client code, the connect call returns EINPROGRESS without any nonblocking setup directive, and the send call returns EAGAIN. Here is the strace record for the process: // ... ...
0
votes
0answers
22 views

Can xargs pass stdin to a positon OTHER than the last? [duplicate]

I'm trying to learn how to use xargs and haven't found (not sure if it's possible) is how to pass the stdin from the left side of the pipe to a position OTHER than the last of the right side; for ...
-2
votes
0answers
6 views

What is the functional difference between the x_role and x_run macros in the .if file?

I'm writing user policies and I noticed that the staff.te and sysadm.te in the refpolicy sometimes use x_run() calls and sometimes x_role() calls. What is the functional difference between these two ...
0
votes
0answers
7 views

How to setup for debugging stripped shared libraries?

I'm working on stripping the symbols to prep my (closed source) binaries for distribution and I want to make sure I can debug a core file generated from one of the stripped binaries. I've seen some ...
-1
votes
1answer
28 views

CSV file output reformat

creating a script that reads in a CSV file and reformat the output, the CSV file has five columns but my expected output result when the script is ran should be three columns. two columns were merged ...
-1
votes
0answers
16 views

Failed to install grpc in debian 10 [on hold]

I'm trying to build a project, which needs to run npm install, this project uses Cloud Firestore, which uses grpc who is a dependency of Firestore. But it simply doesn't install. I tried using also ...
1
vote
0answers
30 views

How to use interrupts with x86-64 assembly (AT&T syntax) from Linux?

I would like to: handle mouse events (int $0x33) clear the console (int $0x10) I read that I can not use interrupt calls from Linux. Is there another way to do it if I want to keep using Linux? (I ...
0
votes
1answer
22 views

How to read message from Azure Service Bus using Python?

I have created a service bus queue with send and listen permission. Using C# programming language I am able to the read the data from that queue. But when I am trying the same thing with python I ...
-1
votes
0answers
14 views

Alternatives for Windows to connect to databases inside a Linux server via PuTTY? [on hold]

I use PuTTY(SSH) to connect to a Linux server from a Windows machine, and from PuTTY i connect to the databases with the commands "isql" for Firebird,"sqlplus" for Oracle and "fisql" for SQL. The ...
-1
votes
1answer
45 views

Using od command on linux has it backwards? [on hold]

Story of the situation, building an assembler with a pre-made assembly language. I am building the commands in my C program. It works, but it comes up backward. My program reads through the test ...
0
votes
1answer
12 views

A problem with automake Mingw cross-compiling of a shared library linked to an installed static library

I am building a test hello-world executable module linking to a simple shared object library 'libshared' which, in turn, links to a static library 'libsodium' that was built in the 'depends' directory....
0
votes
0answers
16 views

.NET CORE 3.0 with windows authentication in docker on linux

I am trying to enable windows authentication using .NET CORE 3.0 application solution in Visual Studio 2019 in docker linux container using mcr.microsoft.com/dotnet/core/aspnet:3.0 image. I can do ...
-1
votes
0answers
32 views

Read output of a bash command from another terminal

Let's say I have htop running in my main terminal window. Is it possible to get its output pulled in another terminal window? I want to SSH to the machine at a later time and check what terminator is ...
0
votes
0answers
18 views

PyQt5: Toggling “Stay on Top” not working in Ubuntu

I am building a cross-platform application that has a button to toggle a Frameless Window "Stay on top" option using PyQt 5.13.1. I used the following options for achieving this. self.setWindowFlags(...
-1
votes
0answers
14 views

how to completely override python2.6 with python3.6, no root access

I'm trying to compile a piece of software, on a linux machine, that requires python. There is a preexisting python 2.6 environment, and a python3.6 environment that I compiled. I want to make sure ...
1
vote
0answers
29 views

Format String Vulnerability Lab

First year Cybersecurity student here (I am new to a lot of things, like Linux and such) I am having some trouble modifying a secret value in my lab. Here is what I need to do for it gcc -z ...
-1
votes
1answer
30 views

pgrep multiple process names

I want to get PIDs of two or more processes using "pgrep" command in Linux. As we know pgrep syntax is pgrep [options] <pattern> Here is a hypothetical command which should return PIDs of ...
-2
votes
1answer
30 views

How to Creat bash script for this [on hold]

I'm using termux app to compile my c/c++ code. Typing g++ [file.cpp] -o [file] and then ./[file] on mobile every time feels hard to me. can anyone tell me Linux script that runs with one simple ...
0
votes
0answers
14 views

How can I access or enumerate available LEDs from kernel code (BeagleBone Black)?

I am trying to write a custom syscall handler that manipulates the LEDs on a BeagleBone Black board. I have gone through the kernel LED API (include/leds.h), but I am unable to find anything that'd ...
-1
votes
0answers
28 views

“Is there a Multi-OS Bluetooth library?” Follow-up: QT Linux to Windows 10 Bluetooth

I've opened this question multiple times while attempting to do research to fix an issue. What has changed in the last 4 years? Documentation says that QT Bluetooth should theoretically support the ...
-1
votes
0answers
11 views

Transfer packages from Windows Subsystem to Ubuntu Dual Boot [on hold]

Apologies if this was asked elsewhere, but I haven't found a solution for my exact situation. I'm trying to transfer the installed packages from my Windows Subsystem for Linux to the dual-boot I just ...
0
votes
0answers
24 views

I installed vscode on linux system, can't compile c ++ [on hold]

I'm trying to get a simple helloworld printout, but I'm having the following problem. what should I do? error: cd "/home/furkan/Desktop/denemee/" && g++ Untitled-1.cpp -o Untitled-1 &&...
0
votes
0answers
6 views

Does CentOS RPM packaging support or dependency in Requires field?

I'd like to know if CentOS supports any "or" package dependencies or Virtual Provides. On Ubuntu, its easy to add an "or" dependency into the Depends field, but can this be done in CentOS? Ubuntu Or ...
-1
votes
1answer
20 views

Installing phoenix framework on ubuntu 19.10

I'm having a problem installing Phoenix framework on ubuntu 19.10, the problem when i try to execute: mix local.hex i've searched everywhere but i did't find a solution till now
-1
votes
2answers
29 views

Sequentially run multiple bash scripts

sorry if this question has already been asked. I simply couldn't figure out right vocabulary to search for it. I have multiple experiments that I need to run in a cluster with GPU. But for now I start ...
-2
votes
0answers
17 views

How to show files where there is hard links in the selected directory? [on hold]

It is must to make just one line command and with some parameter (number of hard links to a file) Need to use find function and specify this parameter
-1
votes
0answers
27 views

Dockerfile - What user should be the owner for a mount point?

In the docker-compose file, below is the volumes instruction for builder service: builder: build: ../../ dockerfile: docker/dev/Dockerfile volumes: - ../../target:/wheelhouse volumes_from:...
1
vote
0answers
19 views

File format error on Ubuntu 32-bit system even though my file is 32-bit

I've built my OpenSSL library on my 32-bit machine and here is the format of the file: $ file /home/amy/ssl/lib/libcrypto.so.1.0.0 /home/amy/ssl/lib/libcrypto.so.1.0.0: ELF 32-bit LSB shared object, ...
0
votes
0answers
33 views

How can two virtual memory pointing to same physical memory in linux

i was reading a page that told: "My microbenchmark begins by allocating one memory page, then creates two virtual address aliases pointing to it" First Question. i want to know how can i create two ...
0
votes
0answers
26 views

How to a check if a variable is a Special char “*” [duplicate]

if [ $MINUTE -gt 0 ] && [ $MINUTE -lt 60 ] || [ $MINUTE == '%s*' ]; then echo "MInute is correctly validated" else #INPUTVALIDATED=false echo "Hour IS NOT VALID" fi Hi ...
-1
votes
0answers
9 views

Tomcat installation vs ziparchive [on hold]

My question is very simple, should I use zip package of tomcat or should I install it ? with zip I can use many version of tomcat and with install mode, tomcat can be added in init.d to start service ...
0
votes
0answers
18 views

sorting a bed file by a column and general number

I have a bed file like this: #chrom start end value chr1 11323785 11617177 0.862170087976540 chr1 12645605 13926923 0.934891485809683 chr1 14750216 ...
0
votes
0answers
29 views

Network Scanner script returning question marks

I'm running a python script as a write along for an online course I'm enrolled in but my scripts throw back errors that I suspect may be a problem with my set up rather than the code. I've attached my ...
0
votes
1answer
30 views

How to direct linux bash script output to one line per host

I'd like to change my script(s) so that the command output is separated by a comma and is all on one line per host. Any ideas on how I can achieve this: 1st Script: #!/bin/bash for i in `cat ~/...