Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [linux]

These questions are about Linux in general -- NOT specific to a particular distribution. If the question just happens to be in a Linux environment, please specify your Linux distribution in the body of your question, but do NOT use the /linux tag.

43
votes
1answer
3k views

Were all Unix commands re-written in Linux?

I would like to know which commands were re-written for Linux and which were retained from Unix?
83
votes
5answers
18k views

Why can't Linux usernames begin with numbers?

Is there a technical reason why? Is this an artifact from the early days of Linux or Unix, and if so is there a reason why it persists?
24
votes
2answers
11k views

per process private file system mount points

I was checking unshare command and according to it's man page, unshare - run program with some namespaces unshared from parent I also see there is a type of namespace listed as, mount namespace ...
23
votes
5answers
24k views

List only bind mounts

Rather than using mount | grep, I'd like to use mount -l -t bind, but that doesn't work, and -t none shows all mounts.
21
votes
10answers
12k views

What is the smallest possible Linux implementation? [closed]

What are the bare minimum components for a Linux OS to be functional, and that I can use as a base to expand and improve as I learn Linux and my understanding and needs grow?
18
votes
9answers
6k views

How can I build a custom distribution for running a simple web browser?

We are assembling some lightweight machines with the express purpose of displaying a single web page over a large screen. I need the machine to essentially boot up as lightweight and as quickly as ...
9
votes
3answers
55k views

Allow a user to read some other users' home directories

I am new to system administration and I have a permission related query. I have a group called administration. Inside the administration group, I have the users user1, user2, user3, superuser. All the ...
25
votes
1answer
4k views

Why does BASH process substitution not work with some commands?

On occasion process substitution will not work as expected. Here is an example: Input: gcc <(echo 'int main(){return 0;}') Output: /dev/fd/63: file not recognized: Illegal seek collect2: error: ...
13
votes
1answer
26k views

“No such file or directory” on an executable, yet file exists and ldd reports all libraries present

So by any other command the executable file exists, yet when I try to execute it, it claims it is not there. It is not a special character in the name because I renamed it though a "cat". And it ...
12
votes
2answers
14k views

Bash Script on Startup? (Linux)

Is there any way to make/run a bash script on reboot (like in Debian/Ubuntu for instance, since thats what my 2 boxes at home have) Also, any recommended guides for doing cron jobs? I'm completely ...
13
votes
4answers
23k views

What are the different ways that a message can be displayed to a bash shell after a user logs in?

I have a CentOS 5.7 VPS using bash as its shell that displays a branded greeting immediately after logging in via SSH. I've been trying to modify it, but can't seem to find where it is in the usual ...
8
votes
1answer
9k views

What should I do to force the root filesystem check (and optionally a fix) at boot?

Yesterday, one of our computers dropped to grub shell or honestly, I am unsure what shell it was when we turned on the machine. It showed that it can't mount the root filesystem or something in this ...
4
votes
3answers
1k views

Method for acting on IP address change from the ISP?

I have a Debian server at home. The server is my router and provides VPN access to the outside. I do not have a static IP address; the lease time given by the ISP is two hours. This cable cell which ...
13
votes
2answers
16k views

Setuid bit seems to have no effect on bash

I was experimenting a bit and noticed something strange: setting the setuid bit on a copy of bash located at /usr/bin/bash-test seemed to have no effect. When I ran an instance of bash-test, my home ...
8
votes
3answers
11k views

Automount USB drives with no GUI requirement (halevt replacement)

For minimal installations of Debian, I have been using halevt to enable automounting of USB drives. Halevt is reliable and requires no configuration aside from installing the package. Now, halevt has ...
4
votes
4answers
8k views

How to recover a file just deleted [duplicate]

I just deleted a file in Nautilus with Shift+Delete, which warned me that "If you delete an item, it will be permanently lost." I wonder if there is no way to recover the file? My OS is Ubuntu 10.10.
3
votes
2answers
2k views

Is there a Linux distro that's UNIX certified?

Is there a Linux distribution certified with the Single UNIX Specification? What are the primary reasons that most distributions don't get certified?
229
votes
10answers
472k views

How to list all files ordered by size

I would like to list all files in the order of big to small in size and the files could be present anywhere in a certain folder.
105
votes
3answers
60k views

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 ...
80
votes
5answers
108k views

Understanding of diff output

I have file1.txt this is the original text line2 line3 line4 happy hacking ! and file2.txt this is the original text line2 line4 happy hacking ! GNU is not UNIX if I do: ...
53
votes
9answers
25k views

Easy incremental backups to an external hard drive

For a while I used Dirvish to do incremental backups of my machines, but it is slightly cumbersome to configure, and if you do not carry a copy of your configuration it can be hard to reproduce ...
69
votes
5answers
36k views

What is the difference between procfs and sysfs?

What is the difference between procfs and sysfs? Why are they made as file systems? As I understand it, proc is just something to store the immediate info regarding the processes running in the ...
49
votes
4answers
54k views

Reply on same interface as incoming?

I have a system with two interfaces. Both interfaces are connected to the internet. One of them is set as the default route; a side effect of this is that if a packet comes in on the non-default-route ...
64
votes
3answers
103k views

How do I identify which Linux distro is running? [duplicate]

We have some new hardware in our office which runs its own customized Linux OS. How do I go about figuring which distro it's based on?
57
votes
6answers
195k views

Linux: How to find the device driver used for a device?

If my target has one device connected and many drivers for that device loaded, how can I understand what device is using which driver?
26
votes
2answers
24k views

How to blacklist a correct bad RAM sector according to MemTest86+ error indication?

MemTest86+ (the version included with Ubuntu 13.04) says Failing address: 002f796c48 - 759.5 MB What should I specify in the memmap kernel parameter to bypass this area? I've tried running ...
42
votes
5answers
9k views

What exactly does init do?

I am creating a linux distro and now I need an init program. I can code in c really well and I know quite a bit about linux (not much but I've been using arch linux for development for 4 years), so I ...
39
votes
5answers
83k views

How to bind USB device under a static name?

I have an Arduino which sometimes gets bound to /dev/ttyUSB0 and other times to /dev/ttyUSB1, making my script fail. I do not want to enumerate all the possibilities of where my device could be, but ...
33
votes
2answers
37k views

/proc/PID/fd/X link number

In Linux, in /proc/PID/fd/X, the links for file descriptors that are pipes or sockets have a number, like: l-wx------ 1 user user 64 Mar 24 00:05 1 -> pipe:[6839] l-wx------ 1 user user 64 Mar 24 ...
28
votes
1answer
3k views

Why isn't a straightforward 1/5/15 minute moving average used in Linux load calculation?

Until recently I thought the load average (as shown for example in top) was a moving average on the n last values of the number of process in state "runnable" or "running". And n would have been ...
38
votes
6answers
3k views

How do I use swap space for emergencies only?

I have a Debian (Buster) laptop with 8 GB RAM and 16GB swap. I'm running a very long running task. This means my laptop has been left on for the past six days while it churns through. While doing ...
21
votes
1answer
24k views

Can't use “userspace” cpufreq governor and set cpu frequency

I'm trying to change the cpu frequency on my laptop (running Linux), and not having any success. Here are some details: # uname -a Linux yoga 3.12.21-gentoo-r1 #4 SMP Thu Jul 10 17:32:31 HKT 2014 ...
25
votes
8answers
86k views

How do I work with GUI tools over a remote server?

I have an Ubuntu server running on EC2 (which I didn't install myself, just picked up an AMI). So far I'm using putty to work with it, but I am wondering how to work on it with GUI tools (I'm not ...
20
votes
4answers
15k views

How to re-load all running applications from swap space into RAM?

If my desktop run out of memory and swaps a lot then I free or kill the application wasting my RAM. But, after that, all my desktop/applications have been swapped and are horribly slow, do you know a ...
38
votes
4answers
45k views

How to read environment variables of a process

Linux's /proc/<pid>/environ does not update (as I understand it, the file contain the initial environment of the process). How can I read a process's current environment?
16
votes
4answers
11k views

What are the minimum root filesystem applications that are required to fully boot linux?

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 ...
48
votes
2answers
15k views

Shebang line with `#!/usr/bin/env command --argument` fails on Linux

I've got a simple script: #!/usr/bin/env ruby --verbose # script.rb puts "hi" On my OSX box, it runs fine: osx% ./script.rb hi However, on my linux box, it throws an error linux% ./script.rb /usr/...
38
votes
1answer
2k views

What happens when Ctrl + Alt + F<Num> is pressed?

I am looking for an explanation of what happens in Linux when this key combination is pressed to change the current terminal. In particular, what software component intercepts this key combination and ...
12
votes
1answer
14k views

top output: cpu usage > 100%

Here is the top output which I gathered: I noticed that top is showing vlc's cpu usage is > 100%. Can anybody please justify me why it is showing like this, whether this is a bug in top application ...
9
votes
5answers
31k views

Rename files by incrementing a number within the filename

I have a directory which contains numbered image files, something like this: 01.png 02.png 03.png 03.svg 04.png 05.png 06.jpg 07.png 08.png 09.png 09.svg 10.png Sometimes there may be multiple ...
25
votes
4answers
15k views

How to fix Ctrl + arrows in Vim?

I am using Putty -> Suse box -> vim 7.2 combo for editing and want to remap Ctrl + arrows combo to a particular task. But for some reason, Vim ignores the shortcut and goes into insert mode and ...
13
votes
2answers
11k views

Are driver modules loaded and unloaded automatically?

On Ubuntu 14.04, I found that when I don't plug in my external wireless adapter, its module rt2800usb is still shown in lsmod. when does automatically loading a driver module happen? Is it when the ...
9
votes
1answer
7k views

How to change font-size, number of rows / columns in the console

I'm running a Linux server without X11 or any kind of GUI, with a modern 22" LCD monitor. Given the huge size of my monitor, I would like to increase the number of rows and columns in my console, how ...
9
votes
2answers
638 views

How to permanently change a file using awk? (“in-place” edits, as with “sed -i”)

I have an awk file new.awk BEGIN { FS=OFS="," } NR==1 { for (i=1; i<=NF; i++) { f[$i] = i } } NR > 1 { begSecs= mktime(gensub(/[":-]/," ","g",$(f["DateTime"]))) endSecs = begSecs +...
19
votes
5answers
27k views

How do I know that my CPU supports 64bit operating systems under Linux?

How can I find out that my CPU supports 64bit operating systems under Linux, e.g.: Ubuntu, Fedora?
11
votes
2answers
15k views

how to disable USB devices based on vendor id in Linux environment?

I want to disable usb devices based on vendor id in Linux environment. I want to allow only specific USB devices, based on vendor id.
10
votes
2answers
2k views

30% of RAM is “buffers”. What is it?

$ free -h total used free shared buff/cache available Mem: 501M 146M 19M 9.7M 335M 331M Swap: 1.0G ...
14
votes
1answer
5k views

Turning off swapping for only one process with cgroups?

I would like to turn off swapping for only one process. Swap should work as usual for the other processes. How I can implement this with cgroups?
13
votes
4answers
55k views

How to run a fresh version of AIX in a Virtual Machine with a Linux host?

I need to learn about AIX, and I only have a laptop with Fedora 14/VirtualBox on it. Is there any chance that I could run an AIX guest in my VirtualBox? My laptop has an Intel(R) Core(TM)2 Duo CPU ...
18
votes
2answers
22k views

Description of kernel.printk values

Between Debian 5 and 6, the default suggested value for kernel.printk in /etc/sysctl.conf was changed from kernel.printk = 4 4 1 7 to kernel.printk = 3 4 1 3. I understand that the first value ...