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
69
votes
11 answers

How to see pip package sizes installed?

I'm not sure this is possible. Google does not seem to have any answers. Running Linux Debian can I list all pip packages and size (amount of disk space used) thats installed? i.e. List all pip packages with size on disk?
Prometheus
  • 32,405
  • 54
  • 166
  • 302
69
votes
6 answers

Moving from JDK 1.7 to JDK 1.8 on Ubuntu

I am on UBUNTU. JDK version currently installed is: java version "1.7.0_51" Java(TM) SE Runtime Environment (build 1.7.0_51-b13) Java HotSpot(TM) 64-Bit Server VM (build 24.51-b03, mixed mode) the configuration being installed is: sudo…
Johan
  • 3,561
  • 9
  • 29
  • 45
69
votes
7 answers

How to read a .properties file which contains keys that have a period character using Shell script

I am trying to read a properties file from a shell script which contains a period (.) character like below: # app.properties db.uat.user=saple user db.uat.passwd=secret #/bin/sh function pause(){ read -p "$*" } file="./app.properties" if [ -f…
Kiran
  • 921
  • 1
  • 11
  • 23
69
votes
10 answers

Run multiple python scripts concurrently

How can I run multiple python scripts? At the moment I run one like so python script1.py. I've tried python script1.py script2.py and that doesn't work: only the first script is run. Also, I've tried using a single file like this; import…
Sami
  • 1,374
  • 1
  • 16
  • 43
69
votes
4 answers

Why does /bin/sh behave differently to /bin/bash even if one points to the other?

While I was playing around in my shell investigating the answer to this question, I noticed that, even though /bin/sh was pointing to /bin/bash on my system, the two commands behave differently. First of all, the output of ls -lh…
Squirrel
  • 2,262
  • 2
  • 18
  • 29
69
votes
1 answer

Difference between arm-eabi arm-gnueabi and gnueabi-hf compilers

What is the difference between arm-eabi, gnueabi and gnueabi-hf cross compilers?
preetam
  • 1,451
  • 1
  • 17
  • 43
69
votes
3 answers

Bash print stderr only, not stdout

I want to lint a file, and print the stderr (error message), but do not print the stdout (saying the file is OK). php -l "foo/bar.php" If there are no errors, it prints a "No errors" message to stdout. If there are errors, it prints a detailed…
MightyPork
  • 18,270
  • 10
  • 79
  • 133
69
votes
4 answers

How to set a variable to current date and date-1 in linux?

I want to set the variable date-today to the current date, and date_dir to yesterday's date, both in the format yyyy-mm-dd. I am doing this: #!/bin/bash d=`date +%y%m%d%H%M%S` echo $d
cloudbud
  • 2,948
  • 5
  • 28
  • 54
69
votes
5 answers

How do I check my gcc C++ compiler version for my Eclipse?

I'm using Eclipse release version 3.7.0, but I can't find the gcc anywhere. How and where can I see the version of gcc I'm currently using?
user1157977
  • 907
  • 1
  • 11
  • 17
69
votes
2 answers

How to remove all non-numeric characters from a string in Bash?

Example: file="123 hello" How can I edit the string file such that it only contains the numbers and the text part is removed? So, echo $file should print 123 only.
Ayush Mishra
  • 1,583
  • 3
  • 13
  • 13
69
votes
2 answers

How to open port in Linux

I have installed and web application which is running on port 8080 on RHEL (centOS). I only have command line access to that machine. I have tried to access that application from my windows machine from which I am connected to server via…
Niraj Chapla
  • 2,149
  • 1
  • 21
  • 34
69
votes
5 answers

Is it better to use git grep than plain grep if we want to search in versioned source code?

In a git repository, is there any difference/benefit using git grep over good old grep? An example would be?
Jim
  • 18,826
  • 34
  • 135
  • 254
69
votes
2 answers

Using iconv to convert from UTF-16LE to UTF-8

Hi I am trying to convert some log files from a Microsoft SQL server, but the files are encoded using UTf-16LE and iconv does not seem to be able to convert them. I am doing: iconv -f UTF-16LE -t UTF-8 I also tried to delete any…
laitha0
  • 4,148
  • 11
  • 33
  • 49
69
votes
5 answers

decode base64: invalid input

Trying to decode base64 file on GNU/Linux, I get "base64: invalid input". $ base64 test.zip | base64 -d > test2.zip base64: invalid input $ ll test* -rw-r--r-- 1 user grp 152 19 11:41 test.zip -rw-r--r-- 1 user grp 57 19 11:42 test2.zip I tried…
andyf
  • 3,262
  • 3
  • 23
  • 37
69
votes
13 answers

How to view unallocated free space on a hard disk through terminal

I want to view the unallocated free space on my hard disk through terminal. I've burned my brains searching the internet for a possible solution, but all in vain. I used all sorts of commands like df, du, fdisk, parted, etc. It tells me about the…
AniketGM
  • 901
  • 1
  • 9
  • 17
1 2 3
99
100