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

14
votes
3answers
4k views

Are multiple @daily crontab entries processed in order, serially?

I want two jobs to run sometime every day, serially, in exactly the order I specify. Will this crontab reliably do what I want? @daily job1 @daily job2 I'm assuming they run one after the other, ...
13
votes
10answers
2k views

What linux is best suited for people new to computers?

What would be the easiest linux for people who are new to computers? The computers here have 256Mb RAM with 40GB hard-disks. UPDATE: Most of them apparently have more than 265MB of RAM with some ...
13
votes
10answers
24k views

List partition labels from the command line

Is there a command that will list all partitions along with their labels? sudo fdisk -l and sudo parted -l don't show labels by default. EDIT: (as per comment below) I'm talking about ext2 labels - ...
13
votes
4answers
7k views

What is the meaning of $? in a shell script?

When going through one shell script, I saw the term "$?". What is the significance of this term?
13
votes
7answers
14k views

Disable screen blanking on text console

I'm running linux clusters, mostly on SLES10. The servers are mostly blades, accessed via remote console. There is a real console in the server room, but switched off. I would like to disable the ...
13
votes
6answers
1k views

Can a Linux command have capital letter(s)?

Can a Linux command have capital letter(s)? I know it's supported but i want to be sure if it's a "problem" or considered "not a good thing"?
13
votes
5answers
12k views

How can I limit the bandwidth used by a process?

I have a CentOS 5.7 server that will be backing up its files nightly. I am concerned that visitors to the various sites that the server hosts will experience degraded performance while the backup is ...
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.)
13
votes
6answers
584 views

How to achieve portability with sed -i (in-place editing)?

I'm writing shell scripts for my server, which is a shared hosting running FreeBSD. I also want to be able to test them locally, on my PC running Linux. Hence, I'm trying to write them in a portable ...
13
votes
3answers
2k views

How can I de-fragment a drive using Ubuntu?

Is it necessary to defrag drives in Ubuntu? If so, how do I do it and how often should it be done?
13
votes
6answers
6k views

What's the best way to partition your drive?

I usually install Linux on a single partition since I only use it as a personal desktop. However every now and then I reinstall the box and what I simply do is to move my files around with an ...
13
votes
3answers
9k views

Why do I need a tty to run sudo if I can sudo without a password?

I have configured sudo to run without a password, but when I try to ssh 'sudo Foo", I still get sudo: sorry, you must have a tty to run sudo. Why does this happen and how can I work around it?
13
votes
4answers
738 views

Is there any reason why I get ^[[A when I press up arrow at the console login screen?

Whenever I'm at the console login, I press up arrow intentionally to see the previously typed commands. But I see this ^[[A. But when I press Ctrl Alt Print Screen Scroll Lock Pause Break Page Up ...
13
votes
3answers
2k views

Why don't you need to update drivers? (Or do you?)

In my life I've not once updated drivers on any of my Linux systems, though they have all been desktops. A friend was asking me why one does not need to update Linux drivers and I found myself unable ...
13
votes
3answers
3k views

Automatically rename files when they are placed in a specific directory

Is it possible to automatically rename a file when it's placed in a specific directory? For example I have a directory named "dir0".I move or copy a file named "file1" to "dir0".then "file1" should ...
13
votes
2answers
900 views

How secure is keeping non-root owned scripts in /etc/init.d?

I have an application which runs as a daemon and is controlled by a script in /etc/init.d Sometimes we need to change some parameters of startup/control of these scripts and then restart the daemon. ...
13
votes
3answers
4k views

(How) can I create a tmpfs as a regular (non-root) user?

The distribution is an Ubuntu server running the 2.6.35-30 Linux kernel. I would like to have a directory that sits completely in memory. Is this possible without root privileges?
13
votes
4answers
9k views

What is the equivalent of Active Directory on Linux

I have a couple of machines at home (plus a number of Linux boxes running in VMs) and I am planning to use one of them as a centralized file server. Since I am more a Linux user rather than a ...
13
votes
5answers
9k views

How to find which process is regularly writing to disk?

How can I find which process is constantly writing to disk? I like my workstation to be close to silent and I just build a new system (P8B75-M + Core i5 3450s -- the 's' because it has a lower max ...
13
votes
4answers
456 views

How do I learn what I can do with /proc and /sys

I'd like to know more about the advanced uses of the /proc and /sys virtual filesystems, but I don't know where to begin. Can anyone suggest any good sources to learn from? Also, since I think sys has ...
13
votes
2answers
3k views

Can I watch the progress of a `sync` operation?

I've copied a large file to a USB disk mounted on a Linux system with async. This returns to a command prompt relatively quickly, but when I type sync, of course, it all has to go to disk, and that ...
13
votes
3answers
34k views

What is the best text-mode browser? [closed]

I am looking for one that is updated frequently and has support for many things. Please also state how to install it.
13
votes
2answers
6k 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 ...
13
votes
3answers
4k views

Understanding /dev and its subdirs and files

$ ls -l /dev/stdin /dev/fd/0 lrwx------ 1 tim tim 64 2011-08-07 09:53 /dev/fd/0 -> /dev/pts/2 lrwxrwxrwx 1 root root 15 2011-08-06 08:14 /dev/stdin -> /proc/self/fd/0 $ ls -l /dev/pts/2 ...
13
votes
2answers
25k views

What is the difference between ioctl(), unlocked_ioctl() and compat_ioctl()?

Going through the linux 2.6.36 source code at lxr.linux.no, I could not find the ioctl() method in file_operations. Instead I found two new calls: unlocked_ioctl() and compat_ioctl(). What is the ...
13
votes
1answer
227 views

Bash No Longer Changes Directory

My bash shell will no longer change directory with cd. I noticed it earlier when working and found that any new shells I opened (terminal or xterm etc) would be stuck in the home directory and could ...
13
votes
3answers
27k views

Why the default eth0 interface is down by default on CentOS?

I am already a little bit familiar with Linux distros like Debian or Ubuntu (yeah, very similar) but I wanted to try Red Hat based - CentOS 6.2 . I have installed it on my Windows 7 host in virtualBox ...
13
votes
2answers
10k 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 ...
13
votes
1answer
4k views

init process: ancestor of all processes?

I have always learned that the init process is the ancestor of all processes. Why does process 2 have a PPID of 0? $ ps -ef | head -n 3 UID PID PPID C STIME TTY TIME CMD root ...
13
votes
4answers
5k 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 ...
13
votes
1answer
416 views

What happens when you rsync without a destination?

To make the story short, I did an rsync: rsync -avP root@exampleserver.com:/tmp/ And I forgot to put in my source directory... :( I really meant to run: rsync -avP /tmp/ ...
13
votes
2answers
11k views

What do the scripts in /etc/profile.d do?

I am reading about basic shell scripting from Linux Command Line and Shell Scripting Bible. It says that the /etc/profile file sets the environment variables at startup of the Bash shell. The ...
13
votes
3answers
7k 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?
13
votes
1answer
18k views

How to use command line to change volume?

I am trying to control the volume using my programming script. How can I do the following in Fedora 15, Ubuntu linux? Mute/ Unmute Volume up and volume down Note: Please note that I use a web USB ...
13
votes
4answers
306 views

Corruption-proof SD card filesystem for embedded Linux?

Recently we had a rather unpleasant situation with our customer - Raspberry Pi based "kiosk" used to display remote sensing data (nothing more fancy than a kiosk mode browser displaying a ...
13
votes
3answers
4k views

How to detect memory type under Linux?

Which Linux utility can tell me if I have registered or unbuffered ECC memory in my server? Lshw and dmidecode do not work for me; dmidecode provides no information about registered vs. unbuffered: ...
13
votes
3answers
4k views

Full disk encryption with password-less authentication in Linux

I have a fairly standard disk encryption setup in Debian 5.0.5: unencrypted /boot partition, and encrypted sdaX_crypt that contains all other partitions. Now, this is a headless server installation ...
13
votes
1answer
2k views

Who creates /etc/{group,gshadow,passwd,shadow}-?

In any linux system I have access to (a couple of Archlinuxes, an Ubuntu, a Debian Sid and a Gentoo) there are the following 4 files in /etc/, all ending with a dash: /etc/group- /etc/gshadow- ...
13
votes
3answers
1k views

Can I limit a user (and their apps) to one network interface?

As the title really. I've actually got two scenarios to apply this: Multiseat Desktop: two network connections both with internet gateways and two accounts doing bandwidth-intensive tasks on each. I ...
13
votes
1answer
1k 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 ...
13
votes
2answers
758 views

How to detect if a disk is seeking?

I can use a variety of tools to measure the volume of disk I/O currently flowing through the system (such as iotop and iostat) but I'm curious if it's possible to easily detect if a disk is seeking a ...
13
votes
6answers
7k views

Correlating /var/log/* timestamps

/var/log/messages, /var/log/syslog, and some other log files use a timestamp which contains an absolute time, like Jan 13 14:13:10. /var/log/Xorg.0.log and /var/log/dmesg, as well as the output of $ ...
13
votes
2answers
5k views

Why does high disk I/O reduce system responsiveness/performance?

I never quite understood why high disk I/O slowed the system so much. It's strange to me because I would expect the slow-down to affect only those processes dependent on the hard/optical drive data, ...
13
votes
3answers
1k views

Given a git patch id, how to find out which kernel release contains it?

Assume I have some issue that was fixed by a recent patch to the official Linux git repository. I have a work around, but I’d like to undo it when a release happens that contains my the fix. I know ...
13
votes
6answers
1k views

Ideal Hardware for GNU/Linux Laptop

What's the best way to find a laptop with hardware that is amenable to installing and running GNU/Linux? I'm looking for something that will ideally work with GPL'd drivers and/or firmware. I took a ...
13
votes
1answer
412 views

Why is /dev full?

The /dev.. is full: SERVER:/dev # df -mP /dev Filesystem 1048576-blocks Used Available Capacity Mounted on udev 12042 12042 0 100% /dev There is no ...
13
votes
2answers
800 views

Why does Linux purge the memory cache when it is nearly full?

Here's what the memory graph looks like on a VPS running CentOS with 512MB of RAM and nginx/php-fpm/mysqld serving (mostly static) content to a couple thousand visitors per day. (those are days on ...
13
votes
5answers
250 views

Good website to link to for generic linux advocacy [closed]

I would like to have a link on website, both advertising the fact that I use (GNU/)linux, and pointing the curious reader to a source to learn more information. But I'm having trouble finding the ...
12
votes
4answers
61k views

How to determine Linux kernel architecture?

uname -m gives i686 and uname -m gives i686 i386 output in Red Hat Enterprise Linux Server release 5.4 (Tikanga) machine. I need to install Oracle Database 10g Release 2 on that machine. So, how can I ...
12
votes
7answers
5k views

What's the best way to format a HDD in Linux in order to leave no trace?

I'm running Debian and need a way to format the entire hdd in order to not leave any trace on it because I want to donate it to a friend. So what will be the best way in order to format it? If I ...