Questions specifically about Linux, as opposed to Unix-like systems in general, or to questions about a specific distribution or program.

learn more… | top users | synonyms

88
votes
5answers
18k views

Is Linux a Unix?

So, there are lots of different versions of Unix out there: HP-UX, AIX, BSD, etc. Linux is considered a Unix clone rather than an implementation of Unix. Are all the "real" Unices actual descendants ...
33
votes
4answers
19k views

Moving linux install to a new computer

I know that it can, in some circumstances, be difficult to move a Windows installation from one computer to another (physically move the hard drive), but how does that work on linux? Aren't most of ...
90
votes
3answers
31k views

Why do directories need the executable (X) permission to be opened?

In my CMS, I noticed that directories need the executable bit (+x) set for the user to open them. Why is the execute permission required to read a directory?
27
votes
3answers
2k views

Can a bash script be hooked to a file?

I want a script to sleep unless a certain file is modifed/deleted (or a file created in a certain directory, or ...). Can this be achieved in some elegant way? The simplest thing that comes to my mind ...
61
votes
3answers
32k views

How do I read from /proc/$pid/mem under Linux?

The Linux proc(5) man page tells me that /proc/$pid/mem “can be used to access the pages of a process's memory”. But a straightforward attempt to use it only gives me $ cat /proc/$$/mem ...
9
votes
3answers
15k views

Output traffic on different interfaces based on destination port

My question is basically the same as Only allow certain outbound traffic on certain interfaces. I have two interfaces eth1 (10.0.0.2) and wlan0 (192.168.0.2). My default route is for eth1. Let's say ...
22
votes
2answers
6k views

What mount points exist on a typical Linux system?

I have 2 questions. During Linux installation we specify memory space for 2 mount points - root and swap. Are there any other mount points created without the users notice? Is this statement ...
10
votes
3answers
9k views

sending text input to a detached screen

I'm trying to run a minecraft server on my unRAID server. The server will run in the shell, and then sit there waiting for input. To stop it, I need to type 'stop' and press enter, and then it'll ...
8
votes
4answers
2k views

32-bit, 64-bit CPU op-mode on Linux

I'm confused. Running Fedora Linux, lscpu yields: Architecture: i686 CPU op-mode(s): 32-bit, 64-bit ... But when I try to install a 64-bit program (Chrome) I get error like: ...
218
votes
9answers
97k views

When should I not kill -9 a process?

I am always very hesitant to run kill -9, but I see other admins do it almost routinely. I figure there is probably a sensible middle ground, so: When and why should kill -9 be used? When and why ...
14
votes
3answers
2k views

Determining Specific File Responsible for High I/O

This is a simple problem but the first time I've ever had to actually fix it: finding which specific files/inodes are the targets of the most I/O. I'd like to be able to get a general system overview, ...
5
votes
2answers
2k views

Why is there a discrepancy in disk usage reported by df and du? [duplicate]

I have a Linux(CentOS) server, the OS+packages used around 5GB. Then, I transferred 97GB data from a Windows server to two folders on this Linux server, after calculated the disk usage, I see the ...
9
votes
2answers
3k views

real memory usage

if I understand correctly, in the following output produced by free, 3535m is the actual free memory available to applications, only 413m is used, is this correct? need some clarification on the ...
75
votes
2answers
9k views

Why do we use su - and not just su?

I don't understand why su - is preferred over su to login as root.
39
votes
5answers
28k views

What is a Superblock, Inode, Dentry and a File?

From the article Anatomy of Linux File Systems by Tim Jones, I read that Linux views all the file systems from the perspective of a common set of objects and these objects are superblock, inode, ...
17
votes
1answer
975 views

Configuring, compiling and installing a linux kernel

I'd like to try using a kernel other than the one provided by my distro -- either from somewhere else, or as customized by me. Is this difficult or dangerous? Where do I start?
7
votes
3answers
601 views

Linux Bulk/Remote Administration

Beside our internal IT infrastructure, we've got around 500 Linux machines hosting our services for the on-line world. They are grouped in a bunch of clusters like Database A-n, Product A-n, NFS, ...
42
votes
11answers
14k views

Recommended reading to better understand Unix/Linux internals [closed]

I've worked on *nix environments for the last four years as a application developer (mostly in C). Please suggest some books/blogs etc. for improving my *nix internals knowledge.
25
votes
6answers
21k views

Correctly determining memory usage in Linux

I'm a bit confused on some of the results I am seeing from "ps" and "free". On my server, this is the result of "free -m" [root@server ~]# free -m total used free shared ...
13
votes
5answers
2k views

Getting information on a machine's hardware in Linux

How can I check what hardware I have? (With BIOS version etc.)
18
votes
1answer
2k views

Run a command for a specified time and then abort if time exceeds

I want know how I can run a command for a specified time say, one minute and if it doesn't complete execution then I should be able to stop it.
11
votes
8answers
2k views

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

You'll have to forgive me, as I'm relatively new at doing something like this, but I need to do the following and I know that it has and can be done. Basically, a few friends and me are assembling ...
8
votes
2answers
7k 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 ...
11
votes
1answer
6k views

What is meant by mounting a device in Linux?

I've heard the term "mounting" when referring to devices in Linux. What is its actual meaning? How it handling now unlike older versions? I haven't done that manually via the command-line. Can you ...
7
votes
2answers
2k views

How to restrict internet access for a particular user on the lan using iptables in Linux

Let's say there are two users on the LAN, A and B. How do I restrict user A from internet access using iptables rules and saving the rules so that after reboot, they are still effective. And suppose I ...
5
votes
6answers
8k views

Unix/Linux undelete/recover deleted files

Is there a command to recover/undelete deleted files by rm? $ rm -rf /path/to/myfile How can I recover myfile? If there is such a tool how can I use it?
4
votes
1answer
1k views

Reading a filesystem from a whole disk image

I ran these commands: VBoxManage clonehd d6b9f0a5-98df-48ca-83c8-91a0809ec349 --format RAW Debian.raw sudo dd if=~/.VirtualBox/HardDisks/Debian.raw of=/dev/sda5 When I try to mount the partition, I ...
6
votes
3answers
5k 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 ...
3
votes
2answers
1k views

Installation on debian 5 32-bit without being a root

I am new to Linux and I am trying to install Skype and Google Chrome on my desktop. It runs Debian 5 32-bit. I downloaded the packages from the web but I have no idea how to install them. I have ...
49
votes
3answers
24k views

What do the flags in /proc/cpuinfo mean?

How can I tell whether my processor has a particular feature? (64-bit instruction set, hardware-assisted virtualization, cryptographic accelerators, etc.) I know that the file /proc/cpuinfo contains ...
5
votes
3answers
4k views

Moved bin and other folders! How to get them back?

I accidentally moved all folders from root to a subfolder. (/bin, /etc, /home, /lib, /usr... all moved) The only ones that were not moved, since they were in use, are /bak, /boot, /dev, /proc, /sys. ...
8
votes
3answers
8k 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?
6
votes
3answers
450 views

Access to original contents of mount point

On my headless NAS I have sdf1 (a flash-card) mounted as / while /home is mounted from lv00 (an LVM volume backed by a software RAID). To be able to access the machine when the RAID fails, I have a ...
28
votes
7answers
8k views

A tool for automatically applying RandR configuration when external display is plugged in

is there a tool which enables one to: remember current RandR configuration (position, orientation, resolution etc) on per-monitor basis, automatically apply last known good configuration as soon as ...
43
votes
4answers
36k views

Limit memory usage for a single Linux process

I'm running pdftoppm to convert a user-provided PDF into a 300DPI image. This works great, except if the user provides an PDF with a very large page size. pdftoppm will allocate enough memory to ...
19
votes
5answers
16k views

How to find creation date of file?

I want to find out the creation date of particular file, not modification date or access date. I have tried with ls -ltrh and stat filename.
27
votes
5answers
22k views

How to reconnect a logically disconnected USB device?

It is possible for a USB storage device to become logically disconnected: the device is still plugged in, but is invisible from the operating system (e.g. it's not listed under /proc/bus/usb). Maybe ...
20
votes
10answers
5k views

How can I reliably get the operating system's name?

Say I am logged into a remote system, how can I know what it's running? On most modern Linuxes (Linuces?), you have the lsb_release command: $ lsb_release -ic Distributor ID: LinuxMint Codename: ...
12
votes
6answers
8k views

How to make a process invisible to other users?

How could you launch a process and make it invisible to the top command? The process is started by a normal user (not root), and should not be visible to other normal users.
16
votes
2answers
3k 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 ...
30
votes
4answers
3k views

unix, difference between path starting with '/' and '//'

In unix/linux, any number of consecutive forwardslashes in a path is generally equivalent to a single forwardslash. eg. $ cd /home/shum $ pwd /home/shum $ cd /home//shum $ pwd /home/shum $ cd ...
20
votes
3answers
2k views

How can I set the processor affinity of a process on Linux?

The question is all in the title: How can I set the processor affinity of a process on Linux?
19
votes
2answers
11k views

How to colorize output of ls ?

I'm running CentOS in Linux text mode. When I run the command ls /usr/, the output is too hard to read (dark blue on black). How can I change the text coloring?
10
votes
5answers
2k views

How do you properly fork a Linux distro?

I was wondering, how one would go about creating a Linux distro. LFS seems like overkill, I would rather fork an existing distro. I know there are several "respin" applications, but these only seem to ...
8
votes
3answers
4k views

what is stored in /dev/pts files and Can we open those?

I am curious to know that what is stored in /dev/pts/ files . Can we open those files ? According to my knowledge /dev/pts files are created for ssh or telnet session .
15
votes
3answers
4k 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 ...
12
votes
4answers
2k views

Block network access of a process?

Is it possible to block the (outgoing) network access of a single process?
9
votes
1answer
651 views

Log every invocation of every SUID program?

I would like to have a log file that contains an entry for every time a user runs any suid program, containing the user name, the program and any command line arguments passed to it. Is there a ...
6
votes
2answers
17k 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 ...
4
votes
4answers
2k 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. ...