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/

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

205121 questions
58
votes
1 answer

ubuntu "No space left on device" but there is tons of space

I am getting the "No space left on device" error for pretty much anything i try to do. Even using tab to autocomplete a command! but when i do df -h i get: ubuntu@ip-10-0-2-108:~$ df -h Filesystem Size Used Avail Use% Mounted on /dev/xvda1 …
Or Gal
  • 1,090
  • 3
  • 10
  • 18
58
votes
8 answers

Home/End keys do not work in tmux

I'm currently using tmux with xterm-256color $TERM variable. When in bash under tmux, pressing home/end would insert tilde characters (~). Outside of tmux the home/end keys work fine. Using cat and tput, I could see that there was a mismatch…
Ben Davis
  • 10,899
  • 9
  • 43
  • 49
58
votes
4 answers

Backup a running Docker container?

Is it possible to backup a running Docker container? Is the export command suitable for doing that?
Slava V
  • 14,804
  • 13
  • 53
  • 60
58
votes
4 answers

find a pattern in files and rename them

I use this command to find files with a given pattern and then rename them to something else find . -name '*-GHBAG-*' -exec bash -c 'echo mv $0 ${0/GHBAG/stream-agg}' {} \; As I run this command, I see some outputs like this mv ./report-GHBAG-1B…
mahmood
  • 19,156
  • 36
  • 118
  • 190
58
votes
5 answers

How to compile and execute from memory directly?

Is it possible to compile a C++ (or the like) program without generating the executable file but writing it and executing it directly from memory? For example with GCC and clang, something that has a similar effect to: c++ hello.cpp -o hello.x &&…
alfC
  • 10,293
  • 4
  • 42
  • 88
58
votes
4 answers

what does "bash:no job control in this shell” mean?

I think it's related to the parent process creating new subprocess and does not have tty. Can anyone explain the detail under the hood? i.e. the related working model of bash, process creation, etc? It may be a very broad topic so pointers to posts…
luanjunyi
  • 1,264
  • 1
  • 12
  • 17
58
votes
5 answers

Why do we need mktemp?

I do not understand the function of mktemp and what a temporary file means. Whats the difference between say touch xyz and mktemp xyz (apart from the fact that mktemp will create some file with xxx appended to it and will have 600…
Shehbaz Jaffer
  • 1,764
  • 8
  • 21
  • 29
58
votes
4 answers

What is the behavior of printing NULL with printf's %s specifier?

Came across an interesting interview question: test 1: printf("test %s\n", NULL); printf("test %s\n", NULL); prints: test (null) test (null) test 2: printf("%s\n", NULL); printf("%s\n", NULL); prints Segmentation fault (core dumped) Though this…
Deepanjan Mazumdar
  • 1,227
  • 2
  • 12
  • 19
58
votes
2 answers

Find "home directory" in Python?

Possible Duplicate: How to find the real user home directory using python? How to get the home directory in Python? I want to access /home/weasel to read some files from there but I don't want to write the full path of course - so other users can…
WeaselFox
  • 6,770
  • 6
  • 39
  • 72
57
votes
3 answers

Listen on a network port and save data to a text file

Is there some easy way in linux to listen for data on network and save them to a text file? Thank you.
Martin Petercak
  • 793
  • 1
  • 8
  • 11
57
votes
1 answer

rm: cannot remove: Permission denied

max@serv$ whoami max max@serv$ ls -la ./defines.php -rwxrwxrwx 1 max max 1985 2011-11-16 02:01 ./defines.php max@serv$ chmod 0777 ./defines.php max@serv$ rm ./defines.php rm: cannot remove `./defines.php': Permission…
Nikolay Baluk
  • 2,175
  • 1
  • 16
  • 21
57
votes
7 answers

Does Windows have Inode Numbers like Linux?

Does Windows have Inode Numbers like Linux? How does Windows internally manage files?
Gautam Bhalla
  • 1,054
  • 2
  • 10
  • 15
57
votes
2 answers

How are asynchronous signal handlers executed on Linux?

I would like to know exactly how the execution of asynchronous signal handlers works on Linux. First, I am unclear as to which thread executes the signal handler. Second, I would like to know the steps that are followed to make the thread execute…
Daniel Trebbien
  • 35,770
  • 14
  • 104
  • 182
57
votes
1 answer

Does epoll(), do its job in O(1)?

Wikipedia says unlike the older system calls, which operate at O(n), epoll operates in O(1) [2]). http://en.wikipedia.org/wiki/Epoll However, the source code at fs/eventpoll.c on Linux-2.6.38, seems it is implemented with an RB tree for…
ddoman
  • 1,001
  • 1
  • 10
  • 12
57
votes
9 answers

How to allocate thread local storage?

I have a variable in my function that is static, but I would like it to be static on a per thread basis. How can I allocate the memory for my C++ class such that each thread has its own copy of the class…
WilliamKF
  • 36,283
  • 61
  • 170
  • 271
1 2 3
99
100