date int64 1,220B 1,719B | question_description stringlengths 28 29.9k | accepted_answer stringlengths 12 26.4k | question_title stringlengths 14 159 |
|---|---|---|---|
1,402,510,190,000 |
In Unix whenever we want to create a new process, we fork the current process, creating a new child process which is exactly the same as the parent process; then we do an exec system call to replace all the data from the parent process with that for the new process.
Why do we create a copy of the parent process in th... |
The short answer is, fork is in Unix because it was easy to fit into the existing system at the time, and because a predecessor system at Berkeley had used the concept of forks.
From The Evolution of the Unix Time-sharing System (relevant text has been highlighted):
Process control in its modern form was designed and... | Why do we need to fork to create new processes? |
1,402,510,190,000 |
Suppose I press the A key in a text editor and this inserts the character a in the document and displays it on the screen. I know the editor application isn't directly communicating with the hardware (there's a kernel and stuff in between), so what is going on inside my computer?
|
There are several different scenarios; I'll describe the most common ones. The successive macroscopic events are:
Input: the key press event is transmitted from the keyboard hardware to the application.
Processing: the application decides that because the key A was pressed, it must display the character a.
Output: th... | How do keyboard input and text output work? |
1,402,510,190,000 |
I'm trying to write a script which will determine actions based on the architecture of the machine. I already use uname -m to gather the architecture line, however I do not know how many ARM architectures there are, nor do I know whether one is armhf, armel, or arm64.
As this is required for this script to determine ... |
On Debian and derivatives,
dpkg --print-architecture
will output the primary architecture of the machine it’s run on. This will be armhf on a machine running 32-bit ARM Debian or Ubuntu (or a derivative), arm64 on a machine running 64-bit ARM.
On RPM-based systems,
rpm --eval '%{_arch}'
will output the current archi... | Easy command line method to determine specific ARM architecture string? |
1,402,510,190,000 |
Please note that I don't ask how. I already know options like pv and rsync -P.
I want to ask why doesn't cp implement a progress bar, at least as a flag ?
|
The tradition in unix tools is to display messages only if something goes wrong. I think this is both for design and practical reasons. The design is intended to make it obvious when something goes wrong: you get an error message, and it's not drowned in not-actually-informative messages. The practical reason is that ... | Why doesn't cp have a progress bar like wget? |
1,402,510,190,000 |
Will the executable of a small, extremely simple program, such as the one shown below, that is compiled on one flavor of Linux run on a different flavor? Or would it need to be recompiled?
Does machine architecture matter in a case such as this?
int main()
{
return (99);
}
|
It depends. Something compiled for IA-32 (Intel 32-bit) may run on amd64 as Linux on Intel retains backwards compatibility with 32-bit applications (with suitable software installed). Here's your code compiled on RedHat 7.3 32-bit system (circa 2002, gcc version 2.96) and then the binary copied over to and run on a Ce... | Will a Linux executable compiled on one "flavor" of Linux run on a different one? |
1,402,510,190,000 |
I know that "Everything is a file" means that even devices have their filename and path in Unix and Unix-like systems, and that this allows for common tools to be used on a variety of resources regardless of their nature. But I can't contrast that to Windows, the only other OS I have worked with. I have read some arti... |
"Everything is a file" is a bit glib. "Everything appears somewhere in the file system" is closer to the mark, and even then, it's more an ideal than a law of system design.
For example, Unix domain sockets are not files, but they do appear in the file system. You can ls -l a domain socket to display its attributes, m... | A layman's explanation for "Everything is a file" — what differs from Windows? |
1,402,510,190,000 |
From the post Why can rm remove read-only files? I understand that rm just needs write permission on directory to remove the file. But I find it hard to digest the behaviour where we can easily delete a file who owner and group different.
I tried the following
mtk : my username
abc : created a new user
$ ls -l file
-r... |
The reason why this is permitted is related to what removing a file actually does. Conceptually, rm's job is to remove a name entry from a directory. The fact that the file may then become unreachable if that was the file's only name and that the inode and space occupied by the file can therefore be recovered at that ... | Why is rm allowed to delete a file under ownership of a different user? |
1,402,510,190,000 |
Why do open() and close() exist in the Unix filesystem design?
Couldn't the OS just detect the first time read() or write() was called and do whatever open() would normally do?
|
Dennis Ritchie mentions in «The Evolution of the Unix Time-sharing System» that open and close along with read, write and creat were present in the system right from the start.
I guess a system without open and close wouldn't be inconceivable, however I believe it would complicate the design.
You generally want to ma... | On Unix systems, why do we have to explicitly `open()` and `close()` files to be able to `read()` or `write()` them? |
1,402,510,190,000 |
I am not sure if I understand the concept of hardware and software interrupts.
If I understand correctly, the purpose of a hardware interrupt is to get some attention of the CPU, part of implementing CPU multitasking.
Then what issues a hardware interrupt? Is it the hardware driver process?
If yes, where is the hard... |
A hardware interrupt is not really part of CPU multitasking, but may drive it.
Hardware interrupts are issued by hardware devices like disk, network cards, keyboards, clocks, etc. Each device or set of devices will have its own IRQ (Interrupt ReQuest) line. Based on the IRQ the CPU will dispatch the request to the ... | What are software and hardware interrupts, and how are they processed? |
1,402,510,190,000 |
Preface: I love bash and have no intention of starting any sort of argument or holy-war, and hopefully this is not an extremely naive question.
This question is somewhat related to this post on superuser, but I don't think the OP really knew what he was asking for. I use bash on FreeBSD, linux, OS X, and cygwin on Wi... |
I can think of three desirable features in a shell:
Interactive usability: common commands should be quick to type; completion; ...
Programming: data structures; concurrency (jobs, pipe, ...); ...
System access: working with files, processes, windows, databases, system configuration, ...
Unix shells tend to concentr... | Object-oriented shell for *nix |
1,402,510,190,000 |
If you fire up a terminal and call an executable (assuming one that's line oriented for simplicity) you get a reply to the command from the executable. How does this get printed to you (the user)? Does the terminal do something like pexpect? (poll waiting for output) or what? How does it get notified of output to be ... |
Originally you had just dumb terminals - at first actually teletypewriters (similar to an electric typewriter, but with a roll of paper) (hence /dev/tty - TeleTYpers), but later screen+keyboard-combos - which just sent a key-code to the computer and the computer sent back a command that wrote the letter on the termina... | How does a Linux terminal work? |
1,402,510,190,000 |
I would like to know how the OS works in a nutshell:
The basic components it's built upon
How those components work together
What makes unix UNIX
What makes it so different from other OSs like Windows
|
A UNIX system consists of several parts, or layers as I'd like to call them.
To start a system, a program called the boot loader lives at the first sector of a hard disk partition. It is started by the system, and in turn it locates the Operating System kernel, and load it.
Layering
The Kernel. This is the central pr... | How does a unix or linux system work? [closed] |
1,402,510,190,000 |
From reading the man pages on the read() and write() calls it appears that these calls get interrupted by signals regardless of whether they have to block or not.
In particular, assume
a process establishes a handler for some signal.
a device is opened (say, a terminal) with the O_NONBLOCK not set (i.e. operating in... |
Summary: you're correct that receiving a signal is not transparent, neither in case i (interrupted without having read anything) nor in case ii (interrupted after a partial read). To do otherwise in case i would require making fundamental changes both to the architecture of the operating system and the architecture of... | Interruption of system calls when a signal is caught |
1,402,510,190,000 |
I used this command to add i386 arch:
sudo dpkg --add-architecture i386
And then immediately after without installing any packages I tried to remove the i386 arch like so:
sudo dpkg --remove-architecture i386
And i got the error:
dpkg: error: cannot remove architecture 'i386' currently in use by the database
Soluti... |
From your list, it looks like you just had the 32-bit packages used for Wine. Wine needs a bunch of 32-bit libraries to run 32-bit Windows applications. You won't be able to remove the i386 architecture unless you uninstall the 32-bit Wine. But there's no point in doing this: there's nothing wrong with having the i386... | dpkg: error: cannot remove architecture 'i386' currently in use by the database |
1,402,510,190,000 |
In my laptop:
$ cat /etc/issue
Ubuntu 18.04 LTS \n \l
There are two different folders for libraries x86 and x86_64:
~$ ls -1 /
bin
lib
lib64
sbin
...
Why for binaries exists only one directory?
P.S. I'm also interested in Android but I hope that answer should be the same.
|
First, why there are separate /lib and /lib64:
The Filesystem Hierarchy Standard
mentions that separate /lib and /lib64 exist because:
10.1. There may be one or more variants of the /lib directory on systems which support more than one binary format requiring
separate libraries. (...) This is commonly used for 64-b... | Why there are `/lib` and `/lib64` but only `/bin`? |
1,402,510,190,000 |
My question is how directories are implemented? I can believe a data structure like a variable e.g. table, array or similar. Since UNIX is Open Source I can look in the source what the program does when it created a new directory. Can you tell me where to look or elaborate on the topic? That a directory "is" a file I ... |
The internal structure of directories is dependent on the filesystem in use. If you want to know precisely what happens, have a look at filesystem implementations.
Basically, in most filesystems, a directory is an associative array between filenames (keys) and inodes numbers (values). Something like this¹:
1167010 .
1... | How are directories implemented in Unix filesystems? |
1,402,510,190,000 |
When I just used pipe in bash, I didn't think more about this. But when I read some C code example using system call pipe() together with fork(), I wonder how to understand pipes, including both anonymous pipes and named pipes.
It is often heard that "everything in Linux/Unix is a file". I wonder if a pipe is actually... |
About your performance question, pipes are more efficient than files because no disk IO is needed. So cmd1 | cmd2 is more efficient than cmd1 > tmpfile; cmd2 < tmpfile (this might not be true if tmpfile is backed on a RAM disk or other memory device as named pipe; but if it is a named pipe, cmd1 should be run in the ... | How to understand pipes |
1,402,510,190,000 |
It's a question about user space applications, but hear me out!
Three "applications", so to speak, are required to boot a functional distribution of Linux:
Bootloader - For embedded typically that's U-Boot, although not a hard requirement.
Kernel - That's pretty straightforward.
Root Filesystem - Can't boot to a shel... |
That entirely depends on what services you want to have on your device.
Programs
You can make Linux boot directly into a shell. It isn't very useful in production — who'd just want to have a shell sitting there — but it's useful as an intervention mechanism when you have an interactive bootloader: pass init=/bin/sh to... | What are the minimum root filesystem applications that are required to fully boot linux? |
1,402,510,190,000 |
I have some doubts regarding *nix.
I don't know which type of executable file is ls, whether it is .sh
or .ksh or any other kind of system executable if it is, what
is that?
when I tried to see what is the source code of ls command looks like, it shows something unreadable, what method does *nix use to create these ... |
You can determine the nature of an executable in Unix using the file command and the type command.
type
You use type to determine an executable's location on disk like so:
$ type -a ls
ls is /usr/bin/ls
ls is /bin/ls
So I now know that ls is located here on my system in 2 locations:/usr/bin/ls & /bin/ls. Looking at t... | How are system commands like ls created? |
1,402,510,190,000 |
Can someone please explain the set-user-ID mechanism in Unix ? What was the rationale behind this design decision? How is it different from effective user id mechanism ?
|
You might know the normal read, write and execute permissions for files in unix.
However, in many applications, this type of permission structure--e.g. giving a given user either full permission to read a given file, or no permission at all to read the file--is too coarse. For this reason, Unix includes another permi... | How does the set-user-ID mechanism work in Unix? |
1,402,510,190,000 |
Can I take a Linux kernel and use it with, say, FreeBSD and vice versa (FreeBSD kernel in, say, a Debian)? Is there a universal answer? What are the limitations? What are the obstructions?
|
No, kernels from different implementations of Unix-style operating systems are not interchangeable, notably because they all present different interfaces to the rest of the system (user space) — their system calls (including ioctl specifics), the various virtual file systems they use...
What is interchangeable to some... | Are different Linux/Unix kernels interchangeable? |
1,402,510,190,000 |
I have a output from lstopo --output-format txt -v --no-io > lstopo.txt for a 8-core node in a cluster, which is https://dl.dropboxusercontent.com/u/13029929/lstopo.txt
The file is a text drawing of the node. It is too wide for both the terminal and gedit on Ubuntu of my laptop, and some of its right is moved by my l... |
Here are the answers to your questions:
I'd view it as a graphical image rather than an ASCII image.
$ lstopo --output-format png -v --no-io > cpu.png
NOTE: You can view the generated file cpu.png
"PU P#" = Processing Unit Processor #. These are processing elements within the cores of the CPU. ... | Interpret the output of lstopo |
1,402,510,190,000 |
I have been through the answer of this question but do not quite understand the difference between system calls and library functions. Conceptually, what is the difference between the two?
|
Conceptually, a library function is part of your process.
At run-time, your executable code and the code of any libraries (such as libc.so) it depends on, get linked into a single process. So, when you call a function in such a library, it executes as part of your process, with the same resources and privileges. It's ... | Difference between system calls and library functions |
1,402,510,190,000 |
I am reading the Wikipedia article for process management. My focus is on Linux. I cannot figure out the relation and differences between system call, message passing and interrupt, in their concepts and purposes. Are they all for processes to make requests to kernel for resources and services?
Some quotes from the ... |
All modern operating systems support multitasking. This means that the system is able to execute multiple processes at the same time; either in pseudo-parallel (when only one CPU is available) or nowadays with multi-core CPUs being common in parallel (one task/core).
Let's take the simpler case of only one CPU being... | What is the relationship between system calls, message passing, and interrupts? |
1,402,510,190,000 |
$ uname -a
Linux 3.13.0-29-generic #53-Ubuntu SMP Wed Jun 4 21:00:20 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
Running ubuntu 12.04.1 LTS. Why does it have the architecture (x86_64) listed thrice?
|
I checked uname manual (man uname) and it says the following for the "-a" option:
print all information, in the following order, except omit -p and -i if unknown
In Ubuntu, I guess, options "-m", "-p" and "-i" (machine, processor and hardware-platform) are returning the machine architecture. For example, if you use... | Why is architecture listed thrice in uname -a? |
1,402,510,190,000 |
I want to install FreeBSD today on a spare HDD I have lying around. I'd like to give it a trial run, learn a few things, and if it suits me I'll replace my current Ubuntu 10.10 'server/NAS/encoding box' with it. Curiosity is the main reason. I also want to see most of the major bugs ironed out of GNOME 3/Unity before ... |
You will notice differences certainly. Most noticable will be differences in the standard userland utilities. FreeBSD does not use GNU ls, GNU cp, and so on. For example, if you're attached to a colorized ls, you may want to alias ls to "ls -G". It does use GNU grep, though. The default shell is a much simpler an... | First FreeBSD install. Is there anything I should know about differences between Linux and BSD? |
1,402,510,190,000 |
(This is not a "which distribution is better" question!)
GNU GUIX and NixOS are two Linux distributions based on the NixOS package manager.
I realize that GUIX seems to use Guile for defining packages/dependencies or other meta-data uses; and I'm guess everything in GUIX is GPL'ed, while perhaps not everything in NixO... |
Basically, there aren't any architectural differences between the two distributions, except for the way they handle the init system:
Guix System uses GNU Sheperd while NixOS uses System D.
To the best of my understanding, Guix/Guix System is a re-implementation of the framework seen in Nix/NixOS, utilizing GNU tooling... | Do GUIX and NixOS differ architecturally? |
1,402,510,190,000 |
I am trying to understand how user permissions work in Linux. The kernel boots and starts init as root, right? Init then runs startup scripts and runs getty (agetty), again as root. Agetty just reads user name and runs login, still as root, I think. Nothing interesting yet. But what does login do? I wasn't able to fin... |
There are several parts to what login programs do. Login programs differ in how they interact with the user who's trying to log in. Here are a few examples:
login: reads input on a text terminal
su: invoked by an already logged-in users, gets most of the data from its command-line arguments, plus authentication data ... | login and su internals |
1,402,510,190,000 |
I am building an rpm using rpmbuild command as:
rpmbuild -bb --root <DIRECTORY> --target i386 --define "_topdir <DIRECTORY>" <specfile>.spec
When I use my SLED 10 SP3 x86 machine, it runs successfully. But on my SLES 10 SP3 x64 Virtual Machine, it gives following error:
error: No compatible architectures found for bui... |
From the Fedora documentation for rpm, spec files, and rpmbuild:
The --target option sets the target architecture at build time. Chapter 3,
Using RPM covers how you can use the --ignoreos and --ignorearch options
when installing RPMs to ignore the operating system and architecture that
is flagged within the RPM. Of ... | How can I build a rpm for i386 target on a x86-64 machine? |
1,402,510,190,000 |
According to http://www.linfo.org/kernel_mode.html in paragraph 7:
When a user process runs a portion of the kernel code via a system call, the process temporarily becomes a kernel process and is in kernel mode. While in kernel mode, the process will have root (i.e., administrative) privileges and access to key syste... |
(I'll try to be brief.)
In theory, there are two dimensions of privileges:
The computer's instruction set architecture (ISA), which protects certain information and/or functions of the machine.
The operating system (OS) creating an eco-system for applications and communication. At its core is the kernel, a program th... | Process in user mode switch to kernel mode. Then the process will have root privileges? |
1,402,510,190,000 |
The man page wait(2) states that the waitpid system call returns the ECHILD error if the specified process is not a child of the calling process. Why is this? Would waiting on a non-child process create some sort of security issue? Is there a technical reason why implementing waiting on a non-child process would be di... |
Because of how waitpid works. On a POSIX system, a signal (SIGCHLD) is delivered to a parent process when one of its child processes dies. At a high level, all waitpid is doing is blocking until a SIGCHLD signal is delivered for the process (or one of the processes) specified. You can't wait on arbitrary processes,... | Why can the waitpid system call only be used with child processes? |
1,402,510,190,000 |
A question that occurred to me earlier: are file permissions/attributes OS- (and therefore kernel-) dependent or are they filesystem-dependent?
It seems to me that the second alternative is the more logical one, yet I never heard of reiserfs file permissions, for example: only "Unix file permissions". On the other han... |
Both the kernel and the filesystem play a role. Permissions are stored in the filesystem, so there needs to be a place to store the information in the filesystem format. Permissions are enforced and communicated to applications by the kernel, so the kernel must implement rules to determine what the information stored ... | How do file permissions/attributes work? Kernel-level, FS-level or both? |
1,402,510,190,000 |
This is for academic purpose. I want to know which commands are executed when we do something in GUI, for example creating a folder. I want to show that both the mkdir shell command and create folder option from GUI does the same thing.
|
You can observe what the process does with the strace command. Strace shows the system calls performed by a process. Everything¹ a process that affects its environment is done through system calls. For example, creating a directory can only be done by ultimately calling the mkdir system call. The mkdir shell command i... | How to know which commands are executed when I do something in GUI |
1,402,510,190,000 |
I compiled a simple "Hello World" C program on Raspberry Pi 3, which was then transferred to an AMD64 laptop. Out of curiosity, I executed it, and it runs even though I did not expect it to:
$ uname -a
Linux 15ud490-gx76k 6.5.0-25-generic #25~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue Feb 20 16:09:15 UTC 2 x86_64 x86_64 x... |
QEMU user emulation is exactly why your binary runs: on your system, one of the QEMU-related packages you’ve installed ensures that QEMU is registered as a handler for all the architectures it can emulate, and the kernel then passes binaries to it. As long as you have the required libraries, if any, the binary will ru... | Why can an aarch64 ELF executable be run on an x86_64 machine? |
1,402,510,190,000 |
The question stated below might not be technically correct(misconception) so it would be appreciable if misconception is also addressed.
Which ring level do the different *nix run levels operate in?
Ring tag not available.
|
Unix runlevels are orthogonal (in the sense "unrelated", "independent of" - see comments) to protection rings.
Runlevels are basically a run time configurations/states of the operating system as a whole, they describe what services are available ("to the user") - like SSH access, MTA, file server, GUI.
Rings are a har... | Rings and run levels |
1,402,510,190,000 |
I am wondering how the login actually works. It certainly is not part of the kernel, because I can set the login to use ldap for example, or keep using /etc/passwd; but the kernel certainly is able to use information from it to perform authentication and authorization activities.
There is also a systemd daemon, calle... |
The login binary is pretty straightforward (in principle). It's just a program that runs as root user (started, indirectly through getty or an X display manager, from init, the first user-space process). It performs authentication of the logging-in user, and if that is successful, changes user (using one of the setu... | How does the Linux login work? [duplicate] |
1,402,510,190,000 |
man uname
-m, --machine print the machine hardware name
-i, --hardware-platform print the hardware platform or "unknown"
What exactly is meant by hardware platform here and how is it different from the "machine hardware name"? I found some related questions on SE but there seems to be some cont... |
A bit more info in info uname:
`-i'
`--hardware-platform'
Print the hardware platform name (sometimes called the hardware
implementation). Print `unknown' if the kernel does not make this
information easily available, as is the case with Linux kernels.
`-m'
`--machine'
Print the machine hardware ... | Meaning of hardware platform in uname command ouput |
1,402,510,190,000 |
Can some one explain in an easy to understand way the concept of memory mappings (achieved by mmap() system call) in Unix like systems ? When do we require this functionality ?
|
Consider: two processes can have the same file open for reading & writing at the same time, so some kind of communication is possible between the two.
When process A writes to the file, it first populates a buffer inside its own process-specific memory with some data, then calls write which copies that buffer into ano... | Concept of memory mapping in Unix like systems |
1,402,510,190,000 |
I'm finding myself helping out some classmates in my computer science class, because I have prior development experience, and I'm having a hard time explaining certain things like the shell. What's a good metaphor for the shell in the context of the Terminal on Mac, contrasted with a remote shell via SSH?
|
Put simply, a terminal is an I/O environment for programs to operate in, and a shell is a command processor that allows for the input of commands to cause actions (usually both interactively and non-interactively (scripted)). The shell is run within the terminal as a program.
There is little difference between a local... | Metaphor for the concept of shell? |
1,402,510,190,000 |
I know that Linux OS's are typically multi-programmed, which means that multiple processes can be active at the same time. Can there be multiple kernels executing at the same time?
|
Sort of. Check out User-mode Linux.
| Can there be multiple kernels executing at the same time? |
1,402,510,190,000 |
Can someone provide me with a very clear and practical example of a "windowing system"? I was reading on Linux, and although I've always known that it's a kernel, I didn't really know what a kernel is because I haven't taken an OS class yet. My understanding of it is that it's basically the layer between hardware and ... |
GNU (Gnu is Not Unix) is an Operative System, created by Richard M. Stallman.
You can use this operative system with different kernel: such as Linux kernel, Hurd kernel, Darwin kernel, etc.
The X Window System (common on Unix like system) is just the basic layer for a GUI environment.
Every Linux distribution is a GNU... | What is a windowing system? |
1,402,510,190,000 |
I know that rc*.d directories are used at startup, or reboot, or so on time, for starting or stopping programs. Can anybody explain me what's the difference between the rc*.d folders placed under the /etc/ path and the other placed under the /etc/rc.d/ path.
Also, what's the difference between /etc/init.d and /etc/rc... |
Nothing. Different Linux distributions, and the LSB, had different standards, so both are present on CentOS to make it easier to run software from different versions. One is just a symbolic link to the other.
http://www.centos.org/docs/5/html/5.1/Installation_Guide/s2-boot-init-shutdown-init.html gives details on th... | What's the difference between /etc/rc.d/rc*.d and /etc/rc*.d |
1,402,510,190,000 |
I'm using 64 bit Kali Linux, previously installed i386 architecture and now I want to remove it, because it downloads about 30Mb data for 32bit package every time apt update.
I tried dpkg --remove-architecture i386, it failed with
dpkg: error: cannot remove architecture 'i386' currently in use by the database
Google s... |
You need to remove them simultaneously, and force their removal in spite of their “protected” status:
dpkg --purge --force-remove-protected {gcc-12-base,libc6,libcrypt1,libgcc-s1}:i386
| Cannot remove architecture i386 |
1,432,207,891,000 |
Output of uname -a on my RHEL 5.4 machine is:
Linux <machine name> 2.6.18-164.el5 #1 SMP Tue Aug 18 15:51:48 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux
Does it mean that hardware is 64 bit (going by perhaps first x86_64) and OS is also 64-bit going by last x86_64?
Also, what are these so many instances of x86_64?
Can I ... |
The hardware, the kernel and the user space programs may have different word sizes¹.
You can see whether the CPU is 64-bit, 32-bit, or capable of both by checking the flags line in /proc/cpuinfo. You have to know the possible flags on your architecture family. For example, on i386/amd64 platforms, the lm flag identif... | How to determine bitness of hardware and OS? |
1,432,207,891,000 |
On my computer, uname -m prints x86_64 as output. What is the list of possible values that this command could output? I intend to use this command from a dynamic runtime to check the CPU architecture.
|
I’m not aware of a definitive list of possible values; however there is a list of values for all Debian architectures, which gives good coverage of the possible values on Linux: aarch64, alpha, arc, arm, i?86, ia64, m68k, mips, mips64, parisc, ppc, ppc64, ppc64le, ppcle, riscv64, s390, s390x, sh, sparc, sparc64, x86_6... | `uname -m` valid values |
1,432,207,891,000 |
Are there any other interfaces, e.g. the /proc filesystem?
|
The Linux kernel syscall API is the the primary API (though hidden under libc, and rarely used directly by programmers), and most standard IPC mechanisms are heavily biased toward the everything is a file approach, which eliminates them here as they ultimately require read/write (and more) calls.
However, on most plat... | Are system calls the only way to interact with the Linux kernel from user land? |
1,432,207,891,000 |
I could see it going both ways. If the filesystem stores it's directory structure and list of files in each directory, and then points to the disk location of each of the files, it shouldn't require the file's data to actually be moved on disk in order to 'move' a file. On the other hand, I could see the 'move' being ... |
Yes, this depends on the type of filesystem. But all the modern filsystems I know of use a pointer scheme of some kind. The linux/unix-filesystems (like ext2, ext3, ext4, ...) do this with INODES.
You can use ls -i on a file to see which inode-number is referenced by the filename (residing as meta-information in the d... | When I move a file to a different directory on the same partition, does the file's data actually move on disk? |
1,432,207,891,000 |
in Ubuntu (or for that matter most other linux distros), I could use the shortcut ctrl+t to open a new tab (in firefox or similar), or I could use alt+tab to make unity switch highlighted window, or I could use alt+ctrl+F<1-6> to get to another tty. What part of linux handles and resolves these shortcuts? What if seve... |
What part of linux handles and resolves these shortcuts?
For the most part, individual applications or a window manager(WM)/desktop environment(DE). There are a few caught and handled by the kernel, such as VT switching with Cntl-Alt-F[N].
The actual event propagates:
From the kernel
To the Xorg server
To the WM/D... | how is a keyboard shortcut given to the correct program? |
1,432,207,891,000 |
What the multiprocessing model for Linux? Is there a default or most commonly used model? Is it similar or very different from say BSD or even the MS Windows kernel?
If SMP is used normally, can assymetric be used instead if desired?
|
From Wikipedia:
Asymmetric multiprocessing (AMP) was a software stopgap for handling
multiple CPUs before symmetric multiprocessing (SMP) was available.
Linux uses SMP.
| What is the default or most commonly used multiprocessing model in Linux? Symmetric or Asymmetric? |
1,432,207,891,000 |
I watched a short intro to Unix from the 70s (https://www.youtube.com/watch?v=7FjX7r5icV8 3D animation starts at 1:56), at the end the general tripartite architecture of Unix was displayed as a 3D animation. Because I have seen already diagrams of the ovarall Linux architecture, I became confused.
Both diagrams, Uni... |
Because the distinction remains a little vague to me, this may not be a very clear answer. I'll just try to expose my point of view, more than actual, technical facts.
First of all, it is probably relevant to note that Linux is a UNIX-like system. This means that while most concepts and implementations have been inspi... | What are the very fundamental differences in architecture between Unix and Linux? [duplicate] |
1,432,207,891,000 |
I'm going to install Arch linux yet I have to choose between several architectures my computer has.
I have an aluminium macbook pro, with a 2.3 GHz Intel Core i5 processor. . The intel webpage tells me this is a dual core processor.
running uname -a in the shell returns:
Darwin Romeos-MacBook-Pro.local 11.3.0 Darwin ... |
Intel Core 2 (i5) is a 64-bit processor supporting Intel 64, Intel 64 is Intel's implementation of x86-64
| Which arch linux should I download? |
1,432,207,891,000 |
I'm writing a program in Java and I need to determine the architecture for which Linux was compiled.
I need something like uname -m, but without running any program, but instead from the /proc pseduo-fs.
What is a reliable source to read from?
|
As you can have a 32-bit Linux installed in a 64-bit machine, the safer way seems to be verifying CPU capabilities. For Intel and compatible processors:
grep -o -w 'lm' /proc/cpuinfo
http://www.unixtutorial.org/2009/05/how-to-confirm-if-your-cpu-is-32bit-or-64bit/
What you're looking for is the following flag: lm. ... | Get Linux architecture from /proc filesystem |
1,432,207,891,000 |
I have a remote machine with LAMP and PHPMyAdmin (PMA). Let's assume this distro is Debian/Ubuntu.
If I install PMA via apt install phpmyadmin (which will make it to be installed under /usr/share/phpmyadmin/ I think) then I wouldn't be able to navigate to PMA based on domains of my websites hosted on that lamp (the fo... |
In fact, Debian installs the majority of PMA into /usr/share/phpmyadmin which is the LSB standard correct location for it. But that's a detail that's not terribly relevant to the premise of your question.
What Debian's PMA package also does is drop a config file in /etc/apache2/conf-available/phpmyadmin.conf that sets... | Accessing PHPMyAdmin as installed by its distro package-index from the domain of each website |
1,432,207,891,000 |
I read that there are two modes called “kernel mode” and “user mode” to handle execution of processes. (Understanding the Linux Kernel, 3rd Edition.) Is that a hardware switch (kernel/user) that is controlled by Linux, or software feature provided by the Linux kernel?
|
Kernel mode and user mode are a hardware feature, specifically a feature of the processor. Processors designed for mid-to-high-end systems (PC, feature phone, smartphone, all but the simplest network appliances, …) include this feature. Kernel mode can go by different names: supervisor mode, privileged mode, etc. On x... | Are “kernel mode” and “user mode” hardware features or software features? |
1,432,207,891,000 |
I want to install a package, and it has different versions for different OSes. The description in the package site is like this
X86-64 Linux 3.0 Kernel
I looked it up and found people saying to use
uname -r
uname -m
I tried it and got this:
3.2.0-24-generic
x86_64
Does this tell me the Linux I'm using is x86_64 and... |
3.2.0 is the version of the source code used to compile this kernel. These can be four numbers long (e.g. 2.6.32.55) indicating a patch level on that version. However, this four digit system was only used for version 2.6 kernels starting at 2.6.8. I.e., it is not used with 3.x kernels, which are the 3 numbers, relea... | How to check Linux kernel? |
1,432,207,891,000 |
I need to get a big endian platform to develop with gcc and g++, what is a solution for that? I know that the SPARC is one of those big endian architectures, but I have no idea what OSs can run on it and how to emulate a SPARC machine under Linux; I also should note that I need any big endian that I can emulate on an ... |
Why Sparc specifically? ARM or MIPS is easier to emulate or to get in hardware, both are bi-endian, and both are supported by Linux in either endianness.
There doesn't seem to be a well-maintained ARM big-endian port, your best bet for ARM seems to be the old Debian NSLU2 port. For MIPS you have the MIPS port.
QEMU ca... | How I can emulate a big endian platform on a x86? |
1,432,207,891,000 |
I do not understand when does a shell, lets say bash, get executed, which program runs bash initially first.
|
The boot sequence of linux/unix has many stages, and there are many references and answers on this site that explain the detail. But to summarise;
Eventually the kernel is loaded with drivers so that the disk and devices can be used, it then starts process with a pid (process id) of 1.
Traditionally this program was ... | When does a shell get executed during the linux startup process |
1,432,207,891,000 |
In the Debian download CD/DVD images page they have different ISO's for the different instruction set architectures. How do I know what is the ISA of a CPU before I buy one? I know about using the commands
cat /proc/cpuinfo
and
lscpu
but these are only good after getting the CPU and running these commands on a Linux... |
If you don't have the cpu, I presume you are buying one or something.
If that is the case, then you can find out everything about the prospective cpu you are going to buy by looking up the data by the model number of the cpu you are looking at.
You can guess the architecture by the manufacturer, as most manufacturers ... | How to find out what is the Instruction Set Architecture (ISA) of a CPU? |
1,432,207,891,000 |
I want to know the difference between architecture and platform in Linux kernel. When I had downloaded the latest kernel tarball, observed that a directory named with arch, it contains different names of processors & inside to any one processor directory again there is a directory called platform.
For example:-
/arch/... |
The architecture is the processor type. There are only a relatively small number of architectures. All processor types that execute the same user code are classified as the same architecture, even though there may be several different ways to compile the kernel; for example x86 and powerpc are a single architecture bu... | Difference between architecture and platform in linux kernel |
1,432,207,891,000 |
I am installing CentOS Linux distribution.
At the partition step, CentOS tells me that it has detected a sda HD in my machine and I should create partitions and assign mount points for this disk.
But I found the logic a little twisted. I understand that Linux treat everything as file and sda is usually the device fil... |
What /dev/sda means
There are four levels: raw disk, raw partition of that disk, formatted filesystem on a partition, and actual files stored within a filesystem.
/dev/sda means an entire disk, not a filesystem. Something with a number at the end is a partition of a disk: dev/sda1 is the first partition of the /dev/sd... | How could Linux use 'sda' device file when it hasn't been installed? |
1,432,207,891,000 |
I am trying to execute this shell script - https://raw.githubusercontent.com/oneindex/script/master/gclone.sh
This shell script checks for uname -m output and doesn't like it ( i.e. aarch64 ).
xd003@localhost:~$ uname -m
aarch64
xd003@localhost:~$
I want to change the uname -m output from aarch64 to arm64 so that it... |
Since it happens to be a bash script (despite the .sh extension), you can always do (within bash):
uname()
if [ "$#" -eq 1 ] && [ "$1" = -m ]; then
echo arm64
else
command uname "$@"
fi
export -f uname
gclone.sh
That is, replace uname with an exported function that outputs what you want when passed a ... | How do i change the output of "uname -m" |
1,432,207,891,000 |
Suppose I have a makefile that builds my package, and I only want the package to build if the package file is not present:
package: foo_0.0.0_amd64.deb
cd foo-0.0.0 && debuild -uc -us
So I am new to the debian build process, but I am anticipating that I'll either find a way to build for different architectures, or... |
On a Debian-based system, the bullet-proof way of determining the architecture, as appropriate for use in a package’s file name, is
dpkg --print-architecture
Note that architecture-independent packages use all there, and you’d have to know that in advance.
| Building packages: command which yields 'amd64' (like uname) |
1,432,207,891,000 |
I'm running Debian Stretch. According to the Debian website, I should be able to install the package rust-doc, yet I can't:
wizzwizz4@myLaptop:~$ sudo apt install rust-doc
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package rust-doc
Everything se... |
There’s nothing wrong with your setup, the problem here is the package pool and the web site. The rust-doc package was disabled with the 1.24.1+dfsg1-1~deb9u1 upload:
Disable -doc package, requires packages not found in stretch and
docs are available online anyway
As a result the package is no longer included... | Can't install rust-doc on Debian Stretch |
1,432,207,891,000 |
I am using GParted (0.28.1, Fedora 25) to format a external drive and noticed that the command displayed is:
mkfs.ext4 -F -O ^64bit -L "INSTALL" /dev/sdd1
When making disks in the past from command line I have just used mkfs.ext4 DEVICE which seemed to work well for various architectures. However the above includes ... |
The default options for mke2fs including those for ext4 can be found in /etc/mke2fs.conf. They could be different depending on the distro you're using. I'd take a look at that file on any distro you're curious about to see if the -O ^64bit param would be necessary. According to the man page the '^' is indeed the prefi... | What does this mkfs.ext4 operand mean? |
1,432,207,891,000 |
Where do application layer protocols reside? Are they part of library routines of language e.g. C, C++, Java?
As goldilocks says in his answer, this is about the implementation of application layer protocols.
|
Where do application layer protocols reside?
Protocols are an abstraction, so they don't really "reside" anywhere beyond specifications and other documentation.
If you mean, where are they implemented, there's a few common patterns:
They may be implemented first in native C as libraries which can be wrapped by for... | Are application layer protocols part of library routines? |
1,432,207,891,000 |
When I am running a line like:
./configure --build=x86_64-redhat-linux-gnu --host=x86_64-redhat-linux-gnu {*shortened*} \
--with-imap-ssl=/usr/include/openssl/ --enable-ftp --enable-mbstring --enable-zip
I understand what the "x86_64-redhat-linux-gnu" means descriptively, but I have questions?
1) Is there a list some... |
The --build and -host options are to configure scripts are standard configure options, and you very rarely need to specify them unless you are doing a cross-build (that is, building a package on one system to run on a different system). The values of these options are called "triples" because they have the form cpu-ve... | Compiling from source: What are the options for config script "build"? |
1,432,207,891,000 |
Linux appears not to mind if I move or delete a file or directory that is still in use by a process. So why does it complain if I try to unmount a device that is in use as a working directory by a process?
Example:
$ mkdir -p a b
$ sudo mount --bind a b
$ sh -c 'cd b; sleep 10' &
[1] 215679
$ sudo umount b
umount: /ho... |
There is a distinct difference here: On a ext2/3/4 filesystem, "deleting" a file by its name means that the reference to the inode, i.e. the data structure where the file data is attached to, is removed (the filename you see in ls is merely a reference to that inode). A file is only considered "deleted" when the last ... | Why are mounts with an active working directory "busy"? |
1,432,207,891,000 |
I just upgraded a Debian Wheezy to Jessie, by changing the /etc/apt/sources.lst. If important: I pinned systemd to stay with sysvinit, and after the upgrade I removed the pin. If I now do apt-get update && apt-get dist-upgrade everything is up to date. So far, everything works fine, only a problem with CUPS authentica... |
For some reason you've ended up with i386 cups-daemon installed, instead of amd64. That's why it ends up needing i386 PAM modules...
To fix this, you need to remove cups-daemon and re-install the amd64 version; as root:
apt-get remove cups-daemon:i386
apt-get install cups-daemon:amd64
If your dpkg architectures are s... | CUPS not working correctly after Debian Wheezy -> Jessie upgrade because of a faulty libpam |
1,432,207,891,000 |
I was trying to crossgrade my architecture from i386 to amd64 (from https://wiki.debian.org/CrossGrading) and I got some error and broke apt-get and dpkg.
apt-get and dpkg output
cannot execute binary file: Exec format error
sudo apt-get outputs
/usr/bin/apt-get: 3: /usr/bin/apt-get: Syntax error: ")" unexpected
... |
I tried to crossgrade too, ended up with the same results as you. Reinstalling the system is the easiest and fastest way of troubleshooting your problem.
| I broke apt-get and dpkg when trying to crossgrade my Debian architecture |
1,432,207,891,000 |
I tried to search for the correct architecture to use for my Intel NUC7I3BNH, but I am none the wiser.
Which architecture would be most appropriate - amd64 or i386?
|
Since https://ark.intel.com/content/www/us/en/ark/products/95066/intel-nuc-kit-nuc7i3bnh.html states, that it supports Windows x64 you should go for amd64.
| Which Debian architecture should I use for my Intel NUC7I3BNH? |
1,432,207,891,000 |
I'm learning to use the terminal on my Ubuntu 14.04 and I'm running command line code in my shell (which I'm told is what is inside the terminal) to install programs. But I can also start my node.js server in my shell and I can then run javascript code in the terminal; it keeps track of values I store in variables and... |
You are correct in saying that, when you open a terminal, you are using a shell.
The primary job of a shell is to help you run executable programs.
So what is an executable? Type lsand hit return. It should print out the files in the current directory. Now, this looks like the shell is running some sort of inbuilt c... | What is the relationship between command line code and higher level language code? |
1,432,207,891,000 |
If you go to the download site of nodejs you can select Linux Binaries (x64) which is a tar archive that (among other files) contains a bin/ folder with a binary called nodejs.
How is nodejs able to provide a "generic" binary that supposedly (or seemingly) is able to run on any linux distro? I know they don't make tha... |
There are ABIs (application binary interfaces) at multiple levels. To make a binary that works everywhere, one of these levels must be targeted. The two levels to target are either the kernel ABI or the LSB ABI.
A .deb package may not be compatible between Debian and Ubuntu because it may have dependencies on other ... | How does nodejs achieve seemingly binary compatibility between different linux distros |
1,326,656,387,000 |
I'm running a small server for our flat share. It's mostly a file server with some additional services. The clients are Linux machines (mostly Ubuntu, but some others Distros too) and some Mac(-Book)s in between (but they're not important for the question). The server is running Ubuntu 11.10 (Oneiric Ocelot) 'Server E... |
Using any mount system, you want to avoid situations where Nautilus lists the directory containing a mount that may or not be mounted. So, with autofs, don't create mounts in, for instance, /nfs. If you do, when you use Nautilus to list the 'File System' it will try to create whatever mounts should exist in /nfs, an... | automount nfs: autofs timeout settings for unreliable servers - how to avoid hangup? |
1,326,656,387,000 |
I want my USB filesystems to automount when I connect the device.
How do I setup automount with systemd via /etc/fstab?
|
Connect your device and find out the UUID of the filesystem by running either blkid or lsblk -f.
Add a line to /etc/fstab such as:
UUID=05C5-A73A /mnt/32GBkey vfat noauto,nofail,x-systemd.automount,x-systemd.idle-timeout=2,x-systemd.device-timeout=2
Then execute:
systemctl daemon-reload && systemctl restart local-... | systemd: How do I automount a USB filesystem using /etc/fstab? |
1,326,656,387,000 |
What is the difference between using auto.master and having autofs automount your NFS mountpoints versus just putting the info in fstab? Linux Red-Hat 5/6
|
With fstab, the advantage is the remote filesystem will be mounted on system (when the noauto mount option is not used).
Additionally, it depends how the mount point is defined. There are two options which determines the recovery behaviour when the NFS client can't reach the server. With the hard option (default one... | Linux: difference between using autofs with NFS and just using fstab |
1,326,656,387,000 |
What method is best to use for mounting a NFS share
from another machine? Mount using /etc/fstab entry or Mount using autofs?
what is the difference between them?
|
Autofs , is auto mounting filesystem on demand like when ever you need it.
NFS is like mounting a complete partition remotely and you will have availability of whole content of the partition.
But there are few advantages with autofs over nfs
Advantages of AutoFS
1 Shares are accessed automatically and transparently wh... | NFS mount with fstab vs autofs |
1,326,656,387,000 |
I'm trying to setup autofs 5 on Debian 9 (Stretch).
I want to mount nfsserver:/top/dir/tools to my /top/dir/tools
Read only is fine in this case and I'm not worried about uid mapping.
auto.master has a line:
+dir: /etc/auto.master.d
I'm guessing that there is a one line file I can stick in /etc/auto.master.d that set... |
After reading through the man pages for way longer than I wanted, I came to the conclusion that you can't do it with one file. The power of +dir: is that it lets you add files to set the configuration so you don't have to edit any package files.
Anything in /etc/auto.master.d is literally included into /etc/auto.mast... | Need example use of autofs.master.d/ |
1,326,656,387,000 |
I have a Solaris 10 server with autofs-mounted home dirs. On one server they are not unmounted after the 10 min timeout period. We've got AUTOMOUNT_TIMEOUT=600 in /etc/default/autofs, I ran automount -t 600, disabled and re-enabled svc:/system/filesystem/autofs:default service and nothing seems to work.
My suspicion i... |
You could try rwsnoop (http://dtracebook.com/index.php/File_System:rwsnoop) to monitor i/o access using dtrace:
# rwsnoop - snoop read/write events.
# Written using DTrace (Solaris 10 3/05).
#
# This is measuring reads and writes at the application level. This matches
# the syscalls read, write, pread and pw... | What process is accessing a mounted filesystem sporadically? |
1,326,656,387,000 |
(crosspost from SF, where I wasn't getting much joy)
I have a CentOS 6.2 box up and running and have configured autofs to automount Windows shares under a /mydomain folder, using various howtos on the internet. Specifically, I have three files:
/etc/auto.master
# ...
/mydomain /etc/auto.mydomain --timeout=60
# ...
... |
I've done a lot of work with autofs and mounting a variety of different types of resources using it. You can check out the man page for autofs which does answer some of your questions if you can keep straight that when they're referring to $USER in the documentation, they're referring to the user that's running the au... | Using autofs to mount under each users' home directory |
1,326,656,387,000 |
I’m running jessie/sid with systemd 208 and try to convert the following wildcard autofs configuration to either an /etc/fstab or .mount/.automount definition.
$ cat /etc/auto.master
/home/* -fstype=nfs homeserver:/exp/home/&
(homeserver runs a Solaris with each subdirectory in /exp/home/ being a separate share.)
Is ... |
I suppose no. The .mount/.automount unit name has to be equal to the mount path, escaped with systemd-escape --path. And the only way in systemd to instantiate units is "template syntax" of a form [email protected]. Hence it is at least not possible to have a dynamically instantiated mount unit.
Just use autofs. syste... | Wildcard automounts with systemd |
1,326,656,387,000 |
I'm struggling to get automount to work as desired.
If I run the following:
sudo mount -t nfs server:/path/to/share /path/to/mount_point
I get the mount appearing fine.
However, if I add the following line to my auto_master:
/path/to/mount_point server:/path/to/share
it creates the mount point directory but the conten... |
The /etc/auto.master file is not the place to set the remote NFS directory path. /etc/auto.master expects to be given a map file or directory. From the auto.master man page:
The auto.master map is consulted to set up automount managed mount points when the autofs(8) script is invoked or the
automount(8) pro... | Automount not equivelent to mount? |
1,326,656,387,000 |
Goal
I have a USB drive -- let's say the drive's ID is /dev/disk/by-id/thediskid
I would like to mount the drive -- by ID -- to a folder (let's call it /MOUNT_FOLDER)
Question
What is the best way to do this using autofs?
Current Attempt
/etc/auto.master:
+auto.master
/localam auto.linux
/[another mount] [auto.o... |
In your constellation /MOUNT_FOLDER is the base directory where subdirectories will be mounted by the indirect mount-map auto.ext-usb.
See man 5 autofs for further details.
Example:
usbdisk -fstype=vfat,uid=yourworkingusername :/dev/disk/by-id/thediskid
If you cd /MOUNT_FOLDER/usbdisk your usbdisk will be mounted the... | How Do I use autofs to map a USB drive by its ID? |
1,326,656,387,000 |
I want a setup where a user home directory is mounted on login (autofs).
This is working with password based authentication. However, I want passwordless authentication, by generating public keys.
Passwordless authentication works well if the user's home directory is stored locally (no autofs).
In my case the keys are... |
You could change AuthorizedKeysFile to something outside the home directory, for example /etc/ssh/keys/%u/authorized_keys. Then the keys would be available before /home/%u is mounted.
From the man page of sshd_config:
AuthorizedKeysFile
Specifies the file that contains the public keys that can be used
... | Autofs home directories with passwordless logins |
1,326,656,387,000 |
Is it ok to have nested directories managed by autofs?
e.g.
/nfs/zfs
/nfs
On my Debian 8 machine, I have /etc/auto.zfs like this:
repo -fstype=nfs,rw 192.168.0.2:/repo
and /etc/auto.nfs like this:
foo -fstype=nfs,rw 192.168.0.3:/foo
My /etc/auto.master.d/nfs.autofs then references these files like this:
/nfs/zfs /... |
Answering my own question.
So apparently the correct way of doing this is through something called "multi-map" or "multiple-mount map", according to man 5 autofs.
<sarcasm>Oh such clear and predictable name.</sarcasm>
It's amazing that the words "nested" or "sub(-)director(y/ies)" do not appear at all in man 5 autofs.... | Nested directories managed by autofs? |
1,326,656,387,000 |
Consider an environment of three Solaris servers (Server1-3):
Where Server1-3 all share a mount nas-server.company.com:/vol/appls-backup, for storing backups and recovery related files at periodic intervals (once every few hours).
Here I think the choice of using AutoFS has obvious advantages - here the automounter... |
You always want to use AutoFS if the storage resource is not up when a system boots. This is one of the primary functions that AutoFS provides. Without it a server will attempt to mount a storage resource, timeout, and never try again if you just mount it at boot up.
Additionally AutoFS allows you the ability to take ... | In what situation would it be more beneficial to use AutoFS over vfstab for shares dedicated to just one server? |
1,326,656,387,000 |
I have an infrastructure of CentOS 6 and CentOS 7 client machines that rely on autofs to automount various NFS filesystems exported by a service elsewhere in my organization. Recently, the clients began manifesting a troublesome behavior in which automounting these filesystems became very slow -- whereas mounting use... |
It seems that that the key clue in the log messages is that the probes logged as having "proto 6" succeed and those logged as having "proto 17" fail. The 6 and 17 turn out to be the IP transport protocol numbers representing TCP and UDP, respectively.
Although NFS is traditionally served over UDP, service over TCP is... | How can I resolve autofs mount delays related to host probing? |
1,326,656,387,000 |
I have a share mounted on an Oracle Solaris application server that read/writes data onto the share periodically. I have automounted it with a timeout of over several minutes but is there a way to ensure it never unmounts the share? Looking at the man pages on the Solaris box and the reference docs, it seems there is ... |
You can display or configure SMF autofs properties by using the sharectl command. For example
# sharectl get autofs
timeout=600
automount_verbose=false
automountd_verbose=false
nobrowse=false
trace=0
environment=
# sharectl set -p timeout=200 autofs
You can check out this link for details
... | Can AutoFS keep a share permanently mounted on Solaris? |
1,326,656,387,000 |
I have a CentOS 7 server named server1.example.com using Samba to share /srv/samba/share. //server1.example.com/share is the path to the share. I am not able to get CentOS clients to mount //server1.example.com/share on /mnt/myShare using AutoFS.
AutoFS is active and running on both the CentOS clients and server.
Bot... |
It took me a few days to figure this out, so I just wanted to share the things I discovered, in case others have a hard time with AutoFS.
Ensure you can manually mount the share using the mount command
Ensure AutoFS is active and running on both the client and server.
In the /etc/auto.master file, ensure the first fi... | AutoFS fails to mount Samba CIFS share |
1,326,656,387,000 |
I am mounting home drives using autofs from a file server:
auto.master
/home /etc/auto.home
auto.home
* tyrell:/nfshome/
This seems to work great, but on the file server, tyrell I'm constantly getting this error:
Apr 27 13:38:08 tyrell rpc.mountd[1145]: authenticated mount request from 192.168.1.164:691 for /nfs... |
This seems to be a problem for people going back to 2004, and which has recently been re-addressed March 2017. It is due to "user-friendly" tools like Nautilus seeking to implement a hidden files feature. To do this it looks for a file called .hidden at the top of a filesystem for a list of filenames to hide. This c... | autofs ~/.hidden: No such file or directory |
1,326,656,387,000 |
I have a samba share that does not require password. Here are non-default lines in my smb.conf:
[global]
map to guest = Bad User
[distr-ro]
path = /home/distr
public = yes
writable = no
On RHEL6 I added this line to /etc/auto.master and it worked:
/cifs /etc/auto.smb --timeout=60
But on Ce... |
I had this same annoyance. Eventually, I ended up switching the automounting to systemd.
You have to create a file in /etc/systemd/system for the mount. Naming conventions require that to be named after the mount point with the path separator replaced by dashes. Since you have a dash in the name already, you'd have to... | autofs asks password for passwordless samba share on Centos 7 |
1,326,656,387,000 |
this line is from the output of dmesg -e on Ubuntu 15.04 using systemd and UEFI:
[ +14.874691] systemd[1]: Inserted module 'autofs4'
as it shows it takes 14 seconds to load. To my knowledge, autofs4 is used to auto-mount partitions on start-up, please correct me if I am wrong. I don't need any partition mounted on s... |
I haven't myself checked that out, but you should be able to blacklist the autofs4 module.
That means you should add
blacklist autofs4
into a modprobe config file, e.g. into a new file /etc/modprobe.d/blacklist-autofs4.conf.
I found this thread https://lists.fedoraproject.org/pipermail/devel/2011-June/152585.html tha... | how to disable autofs4 [closed] |
1,326,656,387,000 |
I am trying to set up SSSD to get automount maps from Active Directory.
I think my settings are correct but it uses the wrong username to query AD.
It takes whatever that is set as "mapname" (behind the + sign) from /etc/auto.master, for example +auto.master results in the following debug log (sssd_autofs debug_level=... |
I have found some help on the #sssd IRC channel.
Apparently the user is log entry does not mean the user connecting, but just the automount map it is looking for.
It appeared I had a misconfiguration on AD.
By raising the domain debug_level to 6 in my sssd.conf as follows:
...
[domain/example.com]
debug_level = 6
...
... | SSSD and autofs |
1,326,656,387,000 |
I wonder if there is any reason to speficically put the domain controlers in the proper order, when configurung a LDAP server using autofs.
For example if specify on a RedHat/CentOS the dc domain controlers in this order :
ou=example, dc=hostname1,dc=people
the LDAP is active and I may see it.
But if by a simple "m... |
You can think of LDAP as a tree (example). Thus, ou=example,dc=hostname1,dc=people will traverse the tree starting at the root dc=people and passing its child dc=hostname1 before arriving at ou=example as a child node of dc=hostname1.
If you mix that order LDAP isn't able to traverse the tree. In your second example i... | The importance of the order in domain controler names for setting an LDAP server, is there any reason? |
1,326,656,387,000 |
I have build myself a nice setup:
I have encrypted encfs folders that are mountable with autofs, i.e. when I enter the folders they will be automatically decrypted. I have the encfs password added to my keyring and wrote a custom script that extracts the password (/usr/local/sbin/load-encfs see below).
The only drawba... |
I finally found the solution after having problems with dbus after an update. New script:
#!/usr/bin/fish
function usage
echo "need at least two arguments"
echo " 1. <user name>:[<config>]:<crypt folder>"
echo " 2. <mount folder>"
exit 1
end
if test (count $argv) -lt 2
usage
end
set split (str... | Automount with autofs, encfs and keyring access |
1,326,656,387,000 |
My company literally has thousands of NFS volumes, which we need to mount on a few of our servers. However, we never mount all of them at the same time; typically we mount about 12 at a time. Most of the time, most of the NFS volumes are actually offline. In the past, we have been mounting and unmounting them manually... |
We have several maps, and some of the maps have 10s, 100s of volumes. So it does work for a fleet of 100s of Linux, 10s of other platforms. The only issue we had with old autofs software in the early days was that it could not cope with modifications and updates online. That is changing the NFS volume and mount point ... | Is it bad to have thousands of autofs rules? |
1,424,716,405,000 |
I had previously been able to configure an NFS server on a computer running CentOS 6.6, and to mount the file system in a Virtual Machine with the same OS and using autofs.
Last week I did a fresh install of all the OSs I had, and now for some reason I cannot get it to work. The server computer still runs CentOS 6.6, ... |
It looks like the problem here were the permission settings on the folder being exported on the server side. So, doing the following on the server allowed me to write from the client:
[root@centosserv ~]# chmod 777 /NFSSHARE
I did this on fresh installs of both the server and the client. Was experiencing the same pro... | What's wrong with my NFS setup? |
1,424,716,405,000 |
I am having an issue with the Mac OS Sierra. I have added a NFS config in a auto_nfs for 2 NFS shares and the autofs picks only the first one.
Here's my auto_master:
#
# Automounter master map
#
+auto_master # Use directory service
/net -hosts -nobrowse,hidefromfinder,nosuid
/home auto... |
After traying everything I was able to resolve my issue. I gave my auto_nfs config to a colleague of mine. In order to make the thing simpler I send the config over Skype. When he applied it everything worked fine for him. Having this in mind I re-created my auto_nfs file using the content that I just send over Skype,... | Mac OS Sierra 10.12 autofs mounts only the first specified NFS volume |
1,424,716,405,000 |
I installed autofs and it's mounting a network drive to a folder in my local linux filesystem. I use -fstype=cifs,rw in the mount command in an /etc/auto.smb.shares file.
If I cd into the mounted folder (or if I have got it open in a Windows Samba Share) and I stop autofs systemctl stop autofs the folder stays mounte... |
When you stop the autofs service, you're removing the reason your automounts were being unmounted in the first place - for lack of use. This is expected behaviour.
So, unless you manually unmount the filesystem, it will stay mounted.
| Stopping Autofs when in a mounted folder and the folder stays mounted |
1,424,716,405,000 |
Automounting not working correctly for CIFS shares; weird results
Base on the above question,
my issue is that my samba/cifs password do have '*' and '&' characters which point me to the lines:
if [ -e "$credfile" ]
then
opts=$opts",credentials=$credfile"
smbclientopts="-A "$credfile
what would be the correct... |
my solution was to install CIFS-UTILS,because the FS type is opts="-fstype=cifs"
sudo apt install cifs-utils
but most of the tutorials that I follow doesn't include this step,maybe
| autofs cifs samba |
1,424,716,405,000 |
I have a Raspberry Pi with samba installed. I've looked into autofs and saw the potential of automounting an external harddrive upon accessing it over the network by my windows machine.
Appearantly the provided auto.smb configuration is intended for a samba client application, but my intention is the other way around.... |
THE SOLUTION!
I've figured it out now. The error messages pointed me in the right direction (again) and digging through google searches I've come across the ntfs-3g package and also the ntfs-config package. The latter provides write ability for NTFS drives and just like that the message Volume is dirty. Mounting read... | How do I automount a hard drive to samba using autofs? |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.