Questions tagged [kernel]

Everything about Unix kernels: development, configuration, compilation, design, etc.

Filter by
Sorted by
Tagged with
396 votes
1 answer

How do you empty the buffers and cache on a Linux system?

Prior to doing some benchmarking work how would one free up the memory (RAM) that the Linux Kernel is consuming for its buffers and cache? Note that this is mostly useful for benchmarking. Emptying ...
slm's user avatar
  • 369k
330 votes
8 answers

How to reload udev rules without reboot?

How should one reload udev rules, so that newly created one can function? I'm running Arch Linux, and I don't have a udevstart command here. Also checked /etc/rc.d, no udev service there.
daisy's user avatar
  • 54.3k
282 votes
4 answers

How does a Segmentation Fault work under-the-hood?

I can't seem to find any information on this aside from "the CPU's MMU sends a signal" and "the kernel directs it to the offending program, terminating it". I assumed that it probably sends the ...
Braden Best's user avatar
  • 2,213
279 votes
2 answers

Kernel inotify watch limit reached

I'm currently facing a problem on a linux box where as root I have commands returning error because inotify watch limit has been reached. # tail -f /var/log/messages [...] tail: cannot watch '/var/...
Ultraspider's user avatar
  • 3,073
171 votes
6 answers

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 /proc/self/...
Gilles 'SO- stop being evil''s user avatar
129 votes
10 answers

Set the default kernel in GRUB

How can I pick which kernel GRUB 2 should load by default? I recently installed a Linux real-time kernel and now it loads by default. I'd like to load the regular one by default. So far I only managed ...
TomTom's user avatar
  • 2,573
124 votes
3 answers

What does the Windows flag in the Linux logo of kernel 3.11 mean?

I've just installed kernel-3.11.0-1.fc20 for my Fedora 19 installation. During the rebooting progress, I saw the Linux logo with a Windows flag in it, what does it mean? The Fedora 19 is installed in ...
LiuYan 刘研's user avatar
122 votes
3 answers

Why is swappiness set to 60 by default?

I just read some stuff about swappiness on Linux. I don't understand why the default is set to 60. According to me this parameter should be set to 10 in order to reduce swap. Swap is on my hard ...
Hugo's user avatar
  • 2,429
119 votes
7 answers

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?
Navaneeth Sen's user avatar
117 votes
6 answers

If Linux is only a kernel, then how were its first versions used (without distribution)?

Linux is only a kernel, and if users want to use it, then they need a complete distribution. That being said, how were the first versions of Linux used when there were no Linux distributions?
noop's user avatar
  • 1,025
116 votes
3 answers

What is difference between User space and Kernel space?

Is Kernel space used when Kernel is executing on the behalf of the user program i.e. System Call? Or is it the address space for all the Kernel threads (for example scheduler)? If it is the first one,...
Poojan's user avatar
  • 1,271
115 votes
13 answers

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?
jjclarkson's user avatar
  • 2,157
100 votes
2 answers

What is kernel ip forwarding?

I have seen on many blogs, using this command to enable IP forwarding while using many network security/sniffing tools on linux echo 1 > /proc/sys/net/ipv4/ip_forward Can anyone explain me in ...
Madhur Ahuja's user avatar
  • 1,499
96 votes
6 answers

How to cause kernel panic with a single command?

Is it possible to cause a kernel panic with a single command line? What would be the most straightforward such command for a sudoing user and what would it be for a regular user, if any? Scenarios ...
Desmond Hume's user avatar
  • 2,788
96 votes
14 answers

How to unload kernel module 'nvidia-drm'?

I'm trying to install the most up-to-date NVIDIA driver in Debian Stretch. I've downloaded from here, but when I try to do sudo sh ./ as ...
Rodrigo's user avatar
  • 1,802
92 votes
6 answers

What is the difference between kernel drivers and kernel modules?

When I do a lspci -k on my Kubuntu with a 3.2.0-29-generic kernel I can see something like this: 01:00.0 VGA compatible controller: NVIDIA Corporation G86 [Quadro NVS 290] (rev a1) Subsystem: ...
JohnnyFromBF's user avatar
  • 3,486
91 votes
4 answers

What are the responsibilities of each Pseudo-Terminal (PTY) component (software, master side, slave side)?

I am trying to figure out how a tty works1 (the workflow and responsibilities of each element). I have read several interesting articles about it, but there are still some blurry areas. This is what I ...
Pierre-Jean's user avatar
  • 2,239
89 votes
3 answers

What happens when I run the command cat /proc/cpuinfo?

What happens when I write cat /proc/cpuinfo. Is that a named pipe (or something else) to the OS which reads the CPU info on the fly and generate that text each time I call it?
slm's user avatar
  • 369k
86 votes
4 answers

Why would anyone choose not to use the lowlatency kernel?

I can't find any good information on the rt and lowlatency Linux kernels. I am wondering why anybody would not want to use a lowlatency kernel. Also, if anyone can tell what the specific differences ...
Startec's user avatar
  • 1,879
77 votes
4 answers

What's the difference of dmesg output and /var/log/messages?

AFAIK dmesg shows information about kernel and kernel modules, and /var/log/messages also shows information produced by kernel and modules. So what's the difference? Does /var/log/messages ⊂ output ...
xanpeng's user avatar
  • 5,715
76 votes
3 answers

What defines the maximum size for a command single argument?

I was under the impression that the maximum length of a single argument was not the problem here so much as the total size of the overall argument array plus the size of the environment, which is ...
Graeme's user avatar
  • 34k
73 votes
12 answers

What's the philosophy behind delaying writing data to disk?

In Linux, a finished execution of a command such as cp or dd doesn't mean that the data has been written to the device. One has to, for example, call sync, or invoke the "Safely Remove" or "Eject" ...
marmistrz's user avatar
  • 2,742
73 votes
5 answers

What is the difference between the following kernel Makefile terms: vmLinux, vmlinuz, vmlinux.bin, zimage & bzimage?

While browsing through the Kernel Makefiles, I found these terms. So I would like to know what is the difference between vmlinux, vmlinuz, vmlinux.bin, zimage & bzimage?
Navaneeth Sen's user avatar
72 votes
11 answers

disable transparent hugepages

We are installing SAP HANA in a RAID machine. As part of the installation step, it is mentioned that, To disable the usage of transparent hugepages set the kernel settings at runtime with echo ...
Ramesh's user avatar
  • 39.2k
72 votes
6 answers

How can I write to dmesg from command line?

I'd like to write a statement to dmesg. How can I do this?
notlesh's user avatar
  • 905
68 votes
9 answers

Who's consuming my inotify resources?

After a recent upgrade to Fedora 15, I'm finding that a number of tools are failing with errors along the lines of: tail: inotify resources exhausted tail: inotify cannot be used, reverting to ...
larsks's user avatar
  • 33.9k
68 votes
5 answers

Why is the Linux kernel called an "image"?

I often hear people refer to the Linux kernel as the Linux kernel image and I can't seem to find an answers on any search engines as to why its called an image. When I think of an image I can only ...
Tony's user avatar
  • 971
66 votes
2 answers

What are the concepts of "kernel ring buffer", "user level", "log level"?

I often saw the words "kernel ring buffer", "user level", "log level" and some other words appear together. e.g. /var/log/dmesg Contains kernel ring buffer information. /var/log/kern.log ...
Tim's user avatar
  • 101k
64 votes
4 answers

How to compile the C compiler from scratch, then compile Unix/Linux from scratch

Let's say I work for a large services organisation outside the US/UK. We use UNIX and Linux servers extensively. Reading through this article it mentions that it would be easy to insert a backdoor ...
David J's user avatar
  • 743
62 votes
2 answers

What's the difference between a kernel oops and a kernel panic?

I know what a kernel panic is, but I've also seen the term "kernel oops". I'd always thought they were the same, but maybe not. So: What is a kernel oops, and how is it different from a kernel panic?
strugee's user avatar
  • 14.9k
60 votes
6 answers

Why would the kernel drop packets?

I interrupted tcpdump with Ctrl+C and got this total summary: 579204 packets captured 579346 packets received by filter 142 packets dropped by kernel What are the "packets dropped by kernel"? Why ...
Raja G's user avatar
  • 5,887
57 votes
3 answers

How to disable USB autosuspend on kernel 3.7.10 or above?

I've updated my HTPC from kernel 3.7.10 to 3.10.7 and it seems CONFIG_USB_SUSPEND is now gone from the kernel options and included in PM. The main problem I'm facing is that I have an external HDD ...
Peter's user avatar
  • 571
57 votes
3 answers

How much RAM does the kernel use?

This question is motivated by my shock when I discovered that Mac OS X kernel uses 750MB of RAM. I have been using Linux for 20 years, and I always "knew" that the kernel RAM usage is dwarfed by X (...
sds's user avatar
  • 1,686
56 votes
4 answers

how is page size determined in virtual address space?

Linux uses a virtual memory system where all of the addresses are virtual addresses and not physical addresses. These virtual addresses are converted into physical addresses by the processor. To ...
JohnMerlino's user avatar
  • 6,081
54 votes
7 answers

Linux Kernel: Good beginners' tutorial [closed]

I'm interested in modifying the kernel internals, applying patches, handling device drivers and modules, for my own personal fun. Is there a comprehensive resource for kernel hacking, intended for ...
Adam Matan's user avatar
  • 2,583
52 votes
8 answers

Where does uname get its information from?

Where does uname really get its information from? I figure this is something that should be straightforward. Unfortunately, I can't find any header containing just that information. Say someone ...
user237251's user avatar
49 votes
2 answers

Turning off power to usb port. Or turn off power to entire usb subsystem

I have a usb lamp which I specifically bought in order to turn it off programmatically at a certain time, thus I need to remove the power to its usb port. I believe I have a usb-hub at usb6. The lamp ...
user84207's user avatar
  • 901
46 votes
4 answers

"Argument list too long": How do I deal with it, without changing my command?

When I run a command like ls */*/*/*/*.jpg, I get the error -bash: /bin/ls: Argument list too long I know why this happens: it is because there is a kernel limit on the amount of space for arguments ...
D.W.'s user avatar
  • 4,011
46 votes
2 answers

how to check rx ring, max_backlog, and max_syn_backlog size

Quite often in the course of troubleshooting and tuning things I find myself thinking about the following Linux kernel settings: net.core.netdev_max_backlog net.ipv4.tcp_max_syn_backlog net.core....
Colin Hostert's user avatar
44 votes
2 answers

How to get back from "testing" to "stable" - Kernel downgrade

currently I am having lot's of fun with apt-get - and the bad thing is, it was my own fault. I had enabled the testing packages in /etc/apt/sources.list to install a certain package. And I told my ...
BurninLeo's user avatar
  • 633
43 votes
3 answers

How is a signal "delivered" in Linux?

I am confused by the terminology used to describe Linux signal delivery. Most texts say things like "the signal is delivered to the process" or "the signal is delivered to the thread&...
Albert's user avatar
  • 521
43 votes
4 answers

What exactly happens when I execute a file in my shell?

So, I thought I had a good understanding of this, but just ran a test (in response to a conversation where I disagreed with someone) and found that my understanding is flawed... In as much detail as ...
Josh's user avatar
  • 8,419
42 votes
4 answers

Why is Linux NFS server implemented in the kernel as opposed to userspace?

I was just wondering why the Linux NFS server is implemented in the kernel as opposed to a userspace application? I know a userspace NFS daemon exists, but it's not the standard method for providing ...
phemmer's user avatar
  • 71.6k
42 votes
8 answers

How does Linux kernel compare to microkernel architectures?

I read once that one advantage of a microkernel architecture is that you can stop/start essential services like networking and filesystems, without needing to restart the whole system. But considering ...
tshepang's user avatar
  • 65.4k
41 votes
3 answers

How is an Interrupt handled in Linux?

I just know that Interrupt is a hardware signal assertion caused in a processor pin. But I would like to know how Linux OS handles it. What all are the things that happen when an interrupt occurs?
Navaneeth Sen's user avatar
41 votes
8 answers

What's the difference of the Userland vs the Kernel? [duplicate]

I am trying to understand exactly what is userland? everyone that I ask says: "Anything that is not kernel". but it is not tangible for me. When I am reading that kernel can run that driver on the ...
r004's user avatar
  • 3,439
41 votes
5 answers

yum installs kernel-devel different from my kernel version

I am attempting to install the VMWare player in Fedora 19. I am running into the problem that multiple users have had where VMware player cannot find the kernel headers. I have installed the kernel-...
Fantastic Mr Fox's user avatar
40 votes
6 answers

How does a kernel mount the root partition?

My question is with regards to booting a Linux system from a separate /boot partition. If most configuration files are located on a separate / partition, how does the kernel correctly mount it at boot ...
Mr. Shickadance's user avatar
40 votes
5 answers

How to switch arch linux to lts kernel?

I'm running a headless server installation of arch linux. The high rate of kernel upgrades caused me some maintainance headache and I therefore wish to switch to the lts kernel. I already installed ...
q9f's user avatar
  • 2,338
38 votes
3 answers

What does the vm.swappiness parameter really control?

Per the kernel documentation: This control is used to define how aggressive the kernel will swap memory pages. Higher values will increase aggressiveness, lower values decrease the amount of swap. ...
phemmer's user avatar
  • 71.6k

2 3 4 5