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
71
votes
3 answers

What does a typical ./configure do in Linux?

Why is it necessary even though everything is specified in a makefile?
Mask
  • 33,129
  • 48
  • 101
  • 125
71
votes
1 answer

DSO missing from command line

I am trying to compile a C++ program like this: $ g++ -o Sniffer_Train main.cpp Sniffer_train.cpp Sniffer_train.h -lmysqlclient -lpcap However I get the following error: /usr/bin/ld: /tmp/cct6xeXD.o: undefined reference to…
srai
  • 1,023
  • 2
  • 14
  • 27
71
votes
1 answer

Bash: let statement vs assignment

What is the difference between assigning to a variable like var=foo and using let like let var=foo? Or cases like var=${var}bar and let var+=bar? What are the advantages and disadvantages of each approach?
IDDQD
  • 3,543
  • 8
  • 29
  • 40
71
votes
3 answers

Remove the last page of a pdf file using PDFtk?

Can someone please tell me how to remove the last page of a PDF file, using PDFtk?
user1974753
  • 1,359
  • 1
  • 18
  • 32
71
votes
9 answers

IDE's for C# development on Linux?

What are my options? I tried MonoDevelop over a year ago but it was extremely buggy. Is the latest version a stable development environment?
ilitirit
  • 16,016
  • 18
  • 72
  • 111
71
votes
8 answers

ssh script returns 255 error

In my code I have the following to run a remote script. ssh root@host.domain.com "sh /home/user/backup_mysql.sh" For some reason it keeps 255'ing on me. Any ideas? I can SSH into the box just fine (passless keys setup) REMOTE SCRIPT: MUSER='root'…
Amanada Smith
  • 1,893
  • 9
  • 28
  • 42
71
votes
5 answers

Remove line of text from multiple files in Linux

Is there a simple way to remove the same line of text from a folder full of text documents at the command line?
Robert
  • 8,406
  • 9
  • 38
  • 57
71
votes
15 answers

Shortest way to swap two files in bash

Can two files be swapped in bash? Or, can they be swapped in a shorter way than this: cp old tmp cp curr old cp tmp curr rm tmp
flybywire
  • 261,858
  • 191
  • 397
  • 503
70
votes
6 answers

How can I get what my main function has returned?

In a C program if we want to give some input from terminal then we can give it by: int main(int argc, char *argv[]) In the same way, if we want to get return value of main() function then how can we get it? In each main() we write return 1 or…
Jeegar Patel
  • 26,264
  • 51
  • 149
  • 222
70
votes
7 answers

Aligning to cache line and knowing the cache line size

To prevent false sharing, I want to align each element of an array to a cache line. So first I need to know the size of a cache line, so I assign each element that amount of bytes. Secondly I want the start of the array to be aligned to a cache…
MetallicPriest
  • 29,191
  • 52
  • 200
  • 356
70
votes
5 answers

Convert a Static Library to a Shared Library?

I have a third-party library which consists mainly of a large number of static (.a) library files. I can compile this into a single .a library file, but I really need it to be a single .so shared library file. Is there any way to convert a static…
Eli Courtwright
  • 186,300
  • 67
  • 213
  • 256
70
votes
5 answers

How to stop a screen process in linux?

I am running a script on a remote server. I ran the script in screen, however I need to stop it before it completes since I need to update the script. I can easily detach from screen, however, is there a way to kill a screen process?
David
  • 14,205
  • 20
  • 97
  • 144
70
votes
9 answers

Convert binary data to hexadecimal in a shell script

I want to convert binary data to hexadecimal, just that, no fancy formatting and all. hexdump seems too clever, and it "overformats" for me. I want to take x bytes from the /dev/random and pass them on as hexadecimal. Preferably I'd like to use only…
davka
  • 13,974
  • 11
  • 61
  • 86
70
votes
4 answers

How to remove the Win10's PATH from WSL

I use Windows Subsystem Linux(Ubuntu 18.04) in my Win10, and I install a Maven in it. Besides, I install a maven in Win10 before. Now when I used mvn compile in WSL, it told me that maven compile fail. I use which mvn and find that it references to…
Sineatos
  • 827
  • 1
  • 7
  • 13
70
votes
7 answers

Is it possible to use arrow keys alone to expand tree node in package explorer in Eclipse on Linux?

When using Eclipse I browse through the package explorer tree using the keyboard arrows a lot. In Windows I can expand a collapsed node by pressing the → key. In Linux I need to press Shift + →. Is there a way to reconfigure this so that Shift is…
Alb
  • 3,601
  • 6
  • 33
  • 38