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
745
votes
4 answers

What is the runtime performance cost of a Docker container?

I'd like to comprehensively understand the run-time performance cost of a Docker container. I've found references to networking anecdotally being ~100µs slower. I've also found references to the run-time cost being "negligible" and "close to zero"…
Luke Hoersten
  • 8,355
  • 3
  • 21
  • 18
739
votes
12 answers

Bash ignoring error for a particular command

I am using following options set -o pipefail set -e In bash script to stop execution on error. I have ~100 lines of script executing and I don't want to check return code of every line in the script. But for one particular command, I want to…
Vivek Goel
  • 22,942
  • 29
  • 114
  • 186
714
votes
7 answers

Chmod 777 to a folder and all contents

I have a web directory /www and a folder in that directory called store. Within store are several files and folders. I want to give the folder store and all files and folders within the store folder all permissions. How do I do this? I am guessing…
RSM
  • 14,540
  • 34
  • 97
  • 144
701
votes
4 answers

Why does ENOENT mean "No such file or directory"?

What does the ENT mean in ENOENT? Shouldn't the error: No such file or directory just be named by ENOFILE? Is there any story or reason?
mingchaoyan
  • 8,096
  • 3
  • 23
  • 31
682
votes
11 answers

Linux command to print directory structure in the form of a tree

Is there any linux command that I can call from a Bash script that will print the directory structure in the form of a tree, e.g., folder1 a.txt b.txt folder2 folder3
user243655
  • 7,749
  • 8
  • 30
  • 33
667
votes
31 answers

How to obtain the number of CPUs/cores in Linux from the command line?

I have this script, but I do not know how to get the last element in the printout: cat /proc/cpuinfo | awk '/^processor/{print $3}' The last element should be the number of CPUs, minus 1.
Richard
  • 14,642
  • 18
  • 56
  • 77
652
votes
10 answers

Why do you need to put #!/bin/bash at the beginning of a script file?

I have made Bash scripts before and they all ran fine without #!/bin/bash at the beginning. What's the point of putting it in? Would things be any different? Also, how do you pronounce #? I know that ! is pronounced as "bang." How is #! pronounced?
node ninja
  • 31,796
  • 59
  • 166
  • 254
652
votes
7 answers

What does the number in parentheses shown after Unix command names in manpages mean?

For example: man(1), find(3), updatedb(2)? What do the numbers in parentheses (Brit. "brackets") mean?
duckyflip
  • 16,189
  • 5
  • 33
  • 36
650
votes
3 answers

Is there a command to list all Unix group names?

I know there is the /etc/group file that lists all users groups. I would like to know if there is a simple command to list all user group names in spite of parsing the world readable /etc/group file. I am willing to create an administrator web page…
cavila
  • 7,834
  • 5
  • 21
  • 19
645
votes
30 answers

Downloading Java JDK on Linux via wget is shown license page instead

When I try to download Java from Oracle I instead end up downloading a page telling me that I need agree to the OTN license terms. Sorry! In order to download products from Oracle Technology Network you must agree to the OTN license terms. Be sure…
thejartender
  • 9,339
  • 6
  • 34
  • 51
644
votes
36 answers

mysql_config not found when installing mysqldb python interface

I am trying to get a Python script to run on the linux server I'm connected to via ssh. The script uses mysqldb. I have all the other components I need, but when I try to install mySQLdb via setuptools like so:, python setup.py install I get the…
user904542
  • 6,965
  • 5
  • 20
  • 28
642
votes
20 answers

How to use 'cp' command to exclude a specific directory?

I want to copy all files in a directory except some files in a specific sub-directory. I have noticed that cp command didn't have the --exclude option. So, how can I achieve this?
David Liu
  • 16,374
  • 12
  • 37
  • 38
638
votes
14 answers

usr/bin/ld: cannot find -l

I'm trying to compile my program and it returns this error : usr/bin/ld: cannot find -l in my makefile I use the command g++ and link to my library which is a symbolic link to my library located on an other directory. Is there an…
ZoOo
  • 6,383
  • 3
  • 13
  • 5
631
votes
20 answers

What characters are forbidden in Windows and Linux directory names?

I know that / is illegal in Linux, and * " / \ < > : | ? are illegal in Windows. What else am I missing? I need a comprehensive guide that also accounts for double-byte characters.
Jeff
  • 14,831
  • 15
  • 49
  • 59
618
votes
31 answers

How to use local docker images with Minikube?

I have several docker images that I want to use with minikube. I don't want to first have to upload and then download the same image instead of just using the local image directly. How do I do this? Stuff I tried: 1. I tried running these commands…
Kapil Gupta
  • 7,091
  • 5
  • 16
  • 25