Questions tagged [linux]

NOTICE: All Linux questions must be related to programming; those that aren't will be closed. 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/

GNU/Linux is a Unix-like computer operating system which consists of necessary user-space libraries and programs provided by GNU in Cambridge, Massachusetts and a kernel, developed by Linus Torvalds in Helsinki, Finland.

The GNU/Linux naming controversy is a dispute among members of the free and open-source software community over how to refer to the computer operating system commonly called .


Design

A GNU/Linux-based system is a modular Unix-like operating system. It derives much of its basic design from principles established in Unix during the 1970s and 1980s. Such a system uses a monolithic kernel that handles process control, networking, and peripheral and file system access. Device drivers are either integrated directly with the kernel or added as modules loaded while the system is running.

Separate projects that interface with the kernel provide much of the system's higher-level functionality. The GNU user land is an important part of most GNU/Linux-based systems, providing the most common implementation of the C library, a popular shell, and many of the common Unix tools which carry out many basic operating system tasks. The graphical user interface (or GUI) used by most GNU/Linux systems is built on top of an implementation of the X Window System.


Tag Usage

The tag on Stack Overflow is generally used for questions about:

  • programming against the APIs supplied by the operating system
  • the implementation of the kernel
  • programming tools and techniques for use on a Linux-based system.

Notable questions that probably don't belong are:

  • questions about using a desktop or laptop GNU/Linux system are better directed towards Super User, Unix & Linux, Ask Ubuntu, or Elementary OS if they're specifically about those distributions.
  • questions about administering GNU/Linux systems for other users and networking GNU/Linux systems in a context more complicated than a minimal home network are better directed towards Server Fault.

Many questions about GNU/Linux can also be properly tagged as , but some features are specific to GNU/Linux and are not found on other Unix™ and Unix-like operating systems. If you have questions about a specific distribution and version (e.g., , it may not be necessary to use this tag for that question.

A fair number of questions are questions about the command shell (bash by default on many systems), and are probably better tagged with and/or the particular shell you are interested in (, , , etc.).

Questions about the internals of the Linux kernel or regarding writing Linux kernel modules should be tagged .


Free Linux and GNU/Linux Books


Common GNU/Linux distributions

Distrowatch aggregates new release notices from these and hundreds of other GNU/Linux distributions, Phoronix keeps track of new GNU/Linux features and GNU/Linux Performance.


Other resources

Related tags

226061 questions
73
votes
6 answers

How to move (and overwrite) all files from one directory to another?

I know of the mv command to move a file from one place to another, but how do I move all files from one directory into another (that has a bunch of other files), overwriting if the file already exists?
Chris
  • 757
  • 1
  • 5
  • 6
73
votes
4 answers

/lib64/ld-linux-x86-64.so.2: No such file or directory error

Background I am using docker to do a school project. Specifically, I pulled an ubuntu image and here is the system config: I then logged into the docker container (ubuntu) and set up elasticsearch. When I try to run ./bin/elasticsearch I get the…
Rieder
  • 1,125
  • 1
  • 11
  • 18
73
votes
7 answers

Convert date formats in bash

I have a date in this format: "27 JUN 2011" and I want to convert it to 20110627 Is it possible to do in bash?
vehomzzz
  • 42,832
  • 72
  • 186
  • 216
73
votes
4 answers

What is the difference between using _exit() & exit() in a conventional Linux fork-exec?

I've been trying to figure out how the fork-exec mechanism is used inside Linux. Everything was going on according to the plan until some web pages started to confuse me. It is said that a child process should strictly use _exit() instead of a…
ned1986zha
  • 775
  • 1
  • 6
  • 5
73
votes
9 answers

How to check what shared libraries are loaded at run time for a given process?

Is there a way to check which libraries is a running process using? To be more specific, if a program loads some shared libraries using dlopen, then readelf or ldd is not going to show it. Is it possible at all to get that information from a running…
BЈовић
  • 62,405
  • 41
  • 173
  • 273
73
votes
22 answers

Error in phpMyAdmin after updating to v4.8.0: The $cfg['TempDir'] (./tmp/) is not accessible

phpMyAdmin worked fine with v4.7.9. Now after updating to v4.8.0 today (replacing the old phpmyadmin folder against the new one) I'm getting this message in phpMyAdmin: The $cfg['TempDir'] (./tmp/) is not accessible. phpMyAdmin is not able to…
David
  • 2,898
  • 3
  • 21
  • 57
73
votes
15 answers

How to get a stack trace for C++ using gcc with line number information?

We use stack traces in proprietary assert like macro to catch developer mistakes - when error is caught, stack trace is printed. I find gcc's pair backtrace()/backtrace_symbols() methods insufficient: Names are mangled No line information 1st…
dimba
  • 26,717
  • 34
  • 141
  • 196
73
votes
4 answers

Using `find -perm` to find when a permission is not set

I want to find the non-readable files in my directory (eg the files with g-r). So I tried this: find . -perm -g-r It shows me all of the files?? So I tried this: find . -perm -g+r And it showed me only the readable files. It appears that -perm…
User1
  • 39,458
  • 69
  • 187
  • 265
73
votes
2 answers

How does cron internally schedule jobs?

How do "modern" cron daemons internally schedule their jobs? Some cronds used to schedule a run every so often via at. So after a crontab is written out, does crond: Parse the crontab for all future events and the sleep for the intervals? Poll an…
Jé Queue
  • 10,359
  • 13
  • 53
  • 61
73
votes
5 answers

How to grep for the dollar symbol ($)?

% cat temp $$$ hello1 $$ hello2 hello3 ## hello4 hello5 $$$ % cat temp | grep "$$$" Illegal variable name. % cat temp | grep "\$\$\$" Variable name must contain alphanumeric characters. % I want to grep for $$$ and I expect the result to…
Lazer
  • 90,700
  • 113
  • 281
  • 364
73
votes
6 answers

How to edit a text file in my terminal

I'm using Linux mint and using the vi command to create text files, now that I created a text file and saved it. How do I get back into to edit the text file again? vi helloWorld.txt
Mad_ Questionnaire
  • 843
  • 3
  • 10
  • 11
73
votes
7 answers

How to compile/install node.js(could not configure a cxx compiler!) (Ubuntu).

How can I compile/install node.js on Ubuntu? It failed with an error about cxx compiler.
Alfred
  • 60,935
  • 33
  • 147
  • 186
73
votes
11 answers

Round a divided number in Bash

How would I round the result from two divided numbers, e.g. 3/2 As when I do testOne=$((3/2)) $testOne contains "1" when it should have rounded up to "2" as the answer from 3/2=1.5
Mint
  • 14,388
  • 30
  • 76
  • 108
73
votes
4 answers

Get total physical memory in Python

How can I get the total physical memory within Python in a distribution agnostic fashion? I don't need used memory, just the total physical memory.
Justin
  • 42,716
  • 77
  • 201
  • 296
73
votes
3 answers

Is it safe to delete the journal file of mongodb?

If I delete the 3.1G journal file, sudo service mongodb restart will fail. However, this file is taking too much space. How can I solve this problem? How can I remove it? bash$ du -sh /var/lib/mongodb/* 4.0K _tmp 65M auction_development.0 128M …
user94602
  • 883
  • 1
  • 7
  • 8