Linux is the family of Unix-like operating systems that use the Linux kernel.
225
votes
7answers
19k views
Understanding the Linux kernel source
I am trying to understand how a function, say mkdir, works by looking at the kernel source. This is an attempt to understand the kernel internals and navigate between various functions. I know mkdir ...
56
votes
2answers
5k views
Why do we use su - and not just su?
I don't understand why su - is preferred over su to login as root.
53
votes
12answers
4k views
What is the benefit of compiling your own linux kernel?
What benefit could I see by compiling a Linux kernel myself? Is there some efficiency you could create by customizing it to your hardware?
49
votes
6answers
5k views
Is Linux a Unix?
So, there are lots of different versions of Unix out there: HP-UX, AIX, BSD, etc. Linux is considered a Unix clone rather than an implementation of Unix. Are all the "real" Unices actual descendants ...
47
votes
15answers
2k views
How do you choose a distribution?
I'm currently looking at putting a Linux (although BSD is still an option) distribution on my old laptop. However, I'm not sure how to wade through all of my options - rolling releases versus not, ...
44
votes
3answers
10k views
Why do directories need the executable (X) permission to be opened?
In my CMS, I noticed that directories need the executable bit (+x) set for the user to open them. Why is the execute permission required to read a directory?
41
votes
9answers
6k views
Why would someone choose FreeBSD over Linux?
Why would someone choose FreeBSD over Linux? What are the advantages of FreeBSD compared to Linux? (My shared hosting provider uses FreeBSD.)
38
votes
3answers
16k views
How do I read from /proc/$pid/mem under Linux?
The Linux proc(5) man page tells me that /proc/$pid/mem “can be used to access the pages of a process's memory”. But a straightforward attempt to use it only gives me
$ cat /proc/$$/mem ...
37
votes
8answers
21k views
SSH easily copy file to local system
If I'm logged in to a system via SSH, is there a way to copy a file back to my local system without firing up another terminal or screen session and doing scp or something similar or without doing SSH ...
36
votes
5answers
12k views
What are high memory and low memory on Linux?
I'm interested in the difference between Highmem and Lowmem:
Why is there such a differentiation?
What do we gain by doing so?
What features does each have?
35
votes
10answers
7k views
Recommended reading to better understand Unix/Linux internals
I've worked on *nix environments for the last four years as a application developer (mostly in C).
Please suggest some books/blogs etc. for improving my *nix internals knowledge.
33
votes
11answers
3k views
Is it good to make a separate partition for /boot?
I've seen some people make a separate partition for /boot. What is the benefit of doing this? What problems might I encounter in the future by doing this?
Also, except for /home and /boot, which ...
33
votes
8answers
19k views
How do I choose a graphics card for Linux?
I'm building or buying a new Linux system, and I'm trying to select the best graphics card for my needs. How do I go about making this decision?
There's dozens of computer-gear review sites which ...
32
votes
4answers
3k views
Why is Linux commonly used as operating system for supercomputers?
As of november 2010, Linux is used on 459 out of the 500 supercomputers of the TOP500.
What are the reasons behind this massive use of Linux in the supercomputer space?
31
votes
8answers
29k views
How can I resolve a hostname to an IP address in a Bash script?
What's the most concise way to resolve a hostname to an IP address in a Bash script? I'm using Arch Linux.
30
votes
7answers
1k views
ZFS under linux, does it work?
Could I get ZFS to work properly in Linux?
Are there any caveats / limitations?
27
votes
6answers
3k views
Software developer switching from Linux to OS X, what are the gotchas?
I have used Ubuntu/Fedora/Red Hat/Suse but haven't used OS X at all. If I have to start using OS X regularly, what are the things I should look out for?
Tools I use are GNU tool chain, C++/Boost, ...
27
votes
5answers
15k views
What is a Superblock, Inode, Dentry and a File?
From the article Anatomy of Linux File Systems by Tim Jones, I read that Linux views all the file systems from the perspective of a common set of objects and these objects are superblock, inode, ...
26
votes
2answers
1k views
Why does a software package run just fine even when it is being upgraded?
Say I am running a software, and then I run package manager to upgrade the software, I notice that Linux does not bring down the running process for package upgrade - it is still running fine. How ...
26
votes
7answers
1k views
Why does mount require root privileges?
Why does Linux require that a user be root/using sudo/specifically authorized per mount in order to mount something? It seems like the decision as to whether to allow a user to mount something should ...
26
votes
5answers
7k views
Can I configure my Linux system for more aggressive file system caching?
I am neither concerned about RAM usage (as I've got enough) nor about losing data in case of an accidental shut-down (as my power is backed, the system is reliable and the data are not critical). But ...
25
votes
9answers
4k views
Easy incremental backups to an external hard drive
For a while I used Dirvish to do incremental backups of my machines, but it is slightly cumbersome to configure, and if you do not carry a copy of your configuration it can be hard to reproduce ...
25
votes
5answers
10k views
Convince apt-get *not* to use IPv6 method
The ISP I work at is setting up an internal IPv6 network in preparation for eventually connecting to the IPv6 internet. As a result, several of the servers in this network now try to connect to ...
24
votes
13answers
8k views
Determine the size of a block device
How can I find out the size of a block device, such as /dev/sda? Running ls -l gives no useful information.
24
votes
6answers
2k views
How do I know if a partition is ext2, ext3, or ext4?
I just formatted stuff. One disk I format as ext2. The other I want to format as ext4. I want to test how they perform.
Now, how do I know the kind of file system in a partition?
24
votes
12answers
2k views
How can I tweak my Linux desktop to be more responsive?
I have the experience that Linux works fine until the physical memory is exhausted. As soon as swap space is used the performance is severely degraded and the GUI becomes unresponsive.
This problem ...
24
votes
1answer
429 views
What happens when Ctrl + Alt + F<Num> is pressed?
I am looking for an explanation of what happens in Linux when this key combination is pressed to change the current terminal. In particular, what software component intercepts this key combination and ...
23
votes
7answers
44k views
How do I find out what hard disks are in the system?
I need to know what hard disks are available, including ones that aren't mounted and possibly aren't formatted. I can't find them in dmesg or /var/log/messages (too much to scroll through). I'm hoping ...
23
votes
4answers
749 views
Execution of possibly harmful program on Linux
I'm writing a program that will test programs written by students. I'm afraid that I can't trust them and I need to make sure that it won't end up badly for the computer running it.
I was thinking ...
23
votes
3answers
13k views
Limit memory usage for a single Linux process
I'm running pdftoppm to convert a user-provided PDF into a 300DPI image. This works great, except if the user provides an PDF with a very large page size. pdftoppm will allocate enough memory to ...
22
votes
9answers
5k views
Why put things other than /home to a separate partition?
So recently a Debian 5.0.5 installer offered me to have separate /usr, /home, /var and /tmp partitions (on one physical disk).
What is the practical reason for this? I understand that /home can be ...
22
votes
6answers
8k views
How can I edit multiple files in VIM?
I know I can open multiple files with vim by doing something like vim 2011-12*.log, but how can I switch between files and close the files one at a time? Also, how can I tell the file name of the ...
22
votes
2answers
2k views
Does grep use a cache to speed up the searches?
I have noticed that subsequent runs of grep on the same query (and also a different query, but on the same file) are much faster than the first run (the effect is easily noticeable when searching ...
22
votes
5answers
851 views
How to strip a Linux system?
I've been building a Linux distro, and I've stripped the binaries, etc. The system won't use GCC or development tools, as it will be a Chrome kiosk, so it would greatly help if I could strip down the ...
21
votes
4answers
1k views
unix, difference between path starting with '/' and '//'
In unix/linux, any number of consecutive forwardslashes in a path is generally equivalent to a single forwardslash. eg.
$ cd /home/shum
$ pwd
/home/shum
$ cd /home//shum
$ pwd
/home/shum
$ cd ...
21
votes
3answers
6k views
How do SO (shared object) numbers work?
I'm aware that shared objects under Linux use "so numbers", namely that different versions of a shared object are given different extensions, for example:
example.so.1
example.so.2
I understand ...
20
votes
5answers
1k views
Is CTRL+C incorrect to use to return to command line?
When I'm using tail -f and I want to return to the shell, I always use CTRL+C. Or when I am typing a command and feel like aborting it and starting over, I simply CTRL+C to get back to an empty ...
20
votes
6answers
2k views
Why isn't there a truly unified package manager for Linux?
Why isn't there a unified package manager that acts as an interface between the end-user and the underlying low-level package manager (apt, yast, pacman, etc.)?
Is it hard to do and therefore not ...
20
votes
4answers
9k views
Moving linux install to a new computer
I know that it can, in some circumstances, be difficult to move a Windows installation from one computer to another (physically move the hard drive), but how does that work on linux? Aren't most of ...
20
votes
5answers
8k views
Difference between /bin and /usr/bin
I read this up on this website and it doesn't make sense.
http://rcsg-gsir.imsb-dsgi.nrc-cnrc.gc.ca/documents/basic/node32.html
When UNIX was first written, /bin and
/usr/bin physically resided ...
20
votes
2answers
6k views
What do the flags in /proc/cpuinfo mean?
How can I tell whether my processor has a particular feature? (64-bit instruction set, hardware-assisted virtualization, cryptographic accelerators, etc.) I know that the file /proc/cpuinfo contains ...
20
votes
3answers
3k views
why not kill -9 a process?
I am always very hesitant to run kill -9.
But I see other admins do it almost routinely.
I figure there is probably a sensible middle ground.
So:
When should kill -9 be used?
What should be tried ...
20
votes
2answers
2k views
what is this new filesystem /run?
I just ran df -h a minute ago and noticed a filesystem has been added that I'm not familliar with. Does anyone know why /run exists? is this something that's
been added by the kernel? by Arch Linux?
...
20
votes
7answers
2k views
How can I use DD to migrate data from an old drive to a new drive?
I am upgrading the internal SATA hard drive on my laptop from a 40G drive to a 160G drive. I have a Linux/Ubuntu desktop which has a SATA card. I would actually like to do the same thing for a couple ...
20
votes
4answers
9k views
How to reconnect a logically disconnected USB device?
It is possible for a USB storage device to become logically disconnected: the device is still plugged in, but is invisible from the operating system (e.g. it's not listed under /proc/bus/usb). Maybe ...
19
votes
3answers
5k views
Difference Between cp -r and cp -R (copy command)
cp- r is meant to copy files recursively, and cp -R for copying directories recursively. But I've checked, and both appear to copy both files and directories, the same thing. So, what's the difference ...
19
votes
2answers
554 views
How frequently is the proc file system updated on Linux?
How frequently is the proc file system updated on Linux? Is it 20 milliseconds (time quantum)?
19
votes
2answers
832 views
Can a bash script be hooked to a file?
I want a script to sleep unless a certain file is modifed/deleted (or a file created in a certain directory, or ...). Can this be achieved in some elegant way? The simplest thing that comes to my mind ...
19
votes
2answers
614 views
How do I remove a file with no permissions?
A hacker has dropped a file in my tmp dir that is causing issues. Nothing malicious except creating GB's of error_log entries because their script is failing. However, the file they are using to ...
18
votes
4answers
4k views
What makes OSX programs not runnable on Linux?
I know there are many differences between OSX and Linux, but what makes them so totally different, that makes them fundamentally incompatible?