39

The ifconfig command on operating systems such as FreeBSD and OpenBSD was updated in line with the rest of the operating system. It nowadays can configure all sorts of network interface settings on those operating systems, and handle a range of network protocols. The BSDs provide ioctl() support for these things. This did not happen in the Linux world. ...


26

That's rather an odd question because you don't run the kernel like you run a program. The kernel is a platform to run programs on. Of course there is setup and shutdown code but it's not possible to run the kernel on its own. There must always be a main "init" process. And the kernel will panic if it's not there. If init tries to exit the kernel will ...


17

Probably you're using UEFI and the /boot used by the bootloader is not that directory you're listing, but an unmounted vfat partition. Check it in /etc/fstab and, if you have a separate /boot partition, just mount /boot before upgrading the kernel. If you don't want to mount manually /boot remove the noauto option from it's line in /etc/fstab


16

The answer is going to depend on whether you literally mean without a file system or if the question is intended to be interpreted a little different from how it is actually stated. The answers for slight variations in how the question is interpreted are: Running Linux without any block devices is entirely feasible and useful for some specialized use cases. ...


13

This answer documents definitive information on Linux support for Intel QST, which was assembled by tracking down archives of the defunct lm-sensors mailing list and directly contacting the authors of some of those messages. The information here is organized in chronological order of the development of Linux QST support. History of Linux QST Support In ...


11

No part of the Linux kernel can be paged out, even parts that come from modules. A kernel module can be loaded and (if the module supports it) can be unloaded. This always happens from an explicit request from a userland process with the init_module and delete_module system calls (normally, via the insmod or modprobe utilities for loading, and via rmmod for ...


10

You need to tell apt to use backports to satisfy the headers’ dependencies: apt install -t stretch-backports linux-headers-4.18.0-0.bpo.1-amd64 I highly recommend installing the default kernel and headers packages instead: apt install -t stretch-backports linux-image-amd64 linux-headers-amd64 That will ensure that you get updated kernels and headers as ...


8

The standard ifconfig we have in many distributions is deprecated for several reasons. Talks in a outdated and limited way with the kernel, and in fact, does not understand anymore all the network configurations. You won't be able to manipulate some network configurations such ifconfig versions that you are able to do with ip. In addition, the ifconfig ...


8

This has been asked for years on the Internet. This topic is as much semantic argument as holy-war. This SE site is about the UNIX & Linux operating systems; Asking 'what is an operating system' here feels disingenuous.


6

That's what cpulimit is for: cpulimit --exe=gzip --background --limit=100 cpulimit --exe=tar --background --limit=100 this will limit the total CPU usage of the most CPU-resource intensive programs used by the backup2l script to 100% per core. If that would still make too much noise, reduce that number until your machine is quiet again. After backup2l is ...


6

You're not supposed to be able to do that (but read below for an interesting exception). If the kernel was to let it happen, then a call like: fd = open(filename, O_CREAT|O_RDWR, 0666); unlink(filename); linkat(fd, "", 0, "/new/path", AT_EMPTY_PATH); would succeed even when the inode referenced by fd has a link count of 0, when done by a process with ...


6

If device name ends with digit then kernel adds 'p' symbol to separate partition number from device name. /dev/sda -> /dev/sda1 /dev/mmcblk0 -> /dev/mmcblk0p1 For details see disk_name function in Linux kernel sources (linux/block/partition-generic.c): if (isdigit(hd->disk_name[strlen(hd->disk_name)-1])) snprintf(buf, BDEVNAME_SIZE, "%sp%d"...


6

A "patch" is a file describing changes to another file (the file can be anything including source code). One of the simplest ways to create and use a patch is with diff and patch. Let's say we have a simple hello world program in a file called hello1.c: #include <stdio.h> int main(void) { printf("Hello world!\n"); return 0; } Now let's change ...


6

“80+deb9u6” is the version of the linux-latest source package; this builds meta-packages which pull in the current kernel package for each platform, for example linux-image-amd64 which you have, and are versioned with the base kernel version, resulting in 4.9+80+deb9u6. “4.9.0-8” is the ABI version of the kernel; it appears in specific kernels’ package ...


6

It’s only security, performance isn’t affected (at least, when perf isn’t running; and even then, perf’s impact is supposed to be minimal). Changing perf_event_paranoid doesn’t change the performance characteristics of the system, whether perf is running or not. There’s a detailed discussion of the security implications of perf in the kernel documentation. ...


6

You should be able to see the thresholds under /sys/devices/platform/coretemp.?/hwmon/hwmon?. The values replacing the question marks will depend on your system; the first is likely to be 0. You’ll see a number of files named temp?_crit, temp?_crit_alarm, temp?_input, temp?_label, and temp?_max. The values replacing the question marks vary again, starting ...


5

/usr/local/bin/myproclimitator: #!/bin/bash # PIDNUM=$1 while sleep 1;do kill -CONT $PIDNUM sleep 0.1 kill -STOP $PIDNUM || exit done Call it like: myproclimitator pidnum


5

mmap(2) is basically a read(2) to a buffer that the kernel is going to write to directly, rather than reading to a kernel buffer and then copying to the provided buffer. There's no mmapat(2) for the same reason there's no readat(2). The file descriptor isn't needed any more because The mmap() function adds an extra reference to the file associated with ...


5

A container isn't defined in Linux. It's purely a construct of the application you use to launch it. Typically there are a number of features that define a container: Namespace isolation mount process UTS ... etc Cgroup resource limitations seccomp restrictions stop apps being able to reach syscalls And so on. Containers aren't defined by cgroups, so ...


5

Memory pages swapping (you call it "paging") and Linux kernel modules loading/unloading are two completely different functionalities. A Linux kernel module can be loaded into the kernel - after that it becomes a part of the kernel. The goal here is to adjust the kernel to a given hardware. For example, there are hundreds of types of network cards, and there ...


4

dirty_ratio per device Q: Are there any ways to "whitelist" the fast devices to have more write cache? Or to have the slow devices (or remote "devices" like //cifs/paths) use less write cache? There are some settings for this, but they are not as effective as you hoped for. See the bdi ("backing device") objects in sysfs: linux-4.18/Documentation/ABI/...


4

First of all, don't be scared by the references to "2.6" in the kernel docs. The current kernels are still members of the "2.6" line, but they went through two rounds of renumbering just for "marketing purposes" (so 2.6.40 became 3.0 and 3.20 then became 4.0). Your 4.19 kernel would normally be labelled 2.6.79. Looks like there's some confusion going on ...


4

Yes, the page tables are stored in the kernel address space. Each process has its own page table structure, which is set up so that the kernel portion of the address space is shared between processes. The kernel address space is not accessible from user space, however. The user space code communicates with the kernel in a controlled manner using system calls....


4

There are two types of watchdog; hardware and software. On the Orange Pi the SOC chip provides a hardware watchdog. If initialised then it needs to be pinged every so often, otherwise it performs a board reset. However not many desktops have hardware watchdogs, so the kernel provides a software version. Now the kernel will try and keep track, and force a ...


4

I'm not a kernel developer, and don't have an authoritative answer, but here's my take on this: New distributions are likely to incorporate the latest stable GCC version available, since it usually provides the most value (in terms of language support, features, diagnostics and optimizations). Maintainers are likely to use the distribution default GCC for ...


4

Am I correct that after execve() terminates with success, the process invokes _start routine of crt0.o? Not necessarily. When the execve system call returns, the process will continue executing from whatever text/code address is the entry point of the binary (in ELF, that's the e_entry field from the header). Example: echo 'void run(void){ printf("in run\...


4

The 32-bit x86 is almost as obsolete today as the 16-bit 8086 was when Linux was born in the early 1990s. Back then the 4 GB virtual address space made possible by the 386 was plenty, because a typical desktop machine only had a few ten megabytes of RAM. Linus made the decision to split up the virtual address space so that the upper 1 GB (starting at ...


4

Does a tmpfs use Linux Page Cache? tmpfs and the page cache are two sides of the same coin. As described in https://www.kernel.org/doc/Documentation/filesystems/tmpfs.txt (emphasis mine) tmpfs puts everything into the kernel internal caches and grows and shrinks to accommodate the files it contains and is able to swap unneeded pages out to swap ...


4

opendir is a library function that calls the open system call internally, just like fopen is a library function that internally calls open. opendir returns a pointer to a directory stream DIR, analogously to fopen, which returns a pointer to a file stream FILE. You can also use the open system call directly on a directory, if you so wish.


4

There are several things you could do: Block kernel module loading until the system is rebooted Simply run echo 1 > /proc/sys/kernel/modules_disabled After this, no new modules can be loaded for as long as the kernel is running. This setting cannot be reset back to 0 without rebooting. This still allows loading modules at boot time, but allows you to ...


Only top voted, non community-wiki answers of a minimum length are eligible