Linux refers to the family of Unix-like computer operating systems using the Linux kernel. If your question is about a certain distribution only, use a more specific tag.

learn more… | top users | synonyms

30
votes
3answers
41k views

How to get list of dependencies of non-installed RPM package?

apt-cache show <package> shows also it's dependencies. yum info <package> does not show dependencies, but it obviously know them. How to ask yum for dependencies of specified package?
30
votes
4answers
67k views

mount dev, proc, sys in a chroot environment?

I'm trying to create a Linux image with custom picked packages.What I'm trying to do is to hand craft the packages I'm going to use on an XO laptop, because compiling packages takes really long time ...
30
votes
3answers
25k views

How do I get out my embedded Windows 8 key from a Linux environment?

I have seen other SuperUser questions on this topic: How to find Windows 8 product key? | How to find Windows 8 OEM product key? However, all of the answers assume you have Windows 8 running. I've ...
30
votes
9answers
89k views

How to check the health of a hard drive

My SATA drive started clicking and I was unable to access the data. It was not clicking loudly though, like a drive that has already gone bad. After tightening the connections to the hard drive, it ...
30
votes
4answers
3k views

How to use a Linux system as a land phone

I have a land line connection. I would like to receive and make calls using my computer. It is a basic land line connection which also provides broadband internet. I am not asking about VoIP. I ...
30
votes
7answers
37k views

Batch-convert files for encoding

How can I batch-convert files in a directory for their encoding (e.g. ANSI->UTF-8) with a command or tool? For single files an editor helps, but how to do the mass files job?
30
votes
10answers
38k views

How to extract text with OCR from a PDF on Linux?

How do I extract text from a PDF that wasn't built with an index? It's all text, but I can't search or select anything. I'm running Kubuntu, and Okular doesn't have this feature.
30
votes
5answers
50k views

How can I know the absolute path of a running process?

If I have multiple copies of the same app on the disk, and only one is running, as I can see with ps, how can I know the absolute path to distinguish from the others?
30
votes
5answers
12k views

How do I physically find a wifi device using a laptop or mobile phone

Okay, so I have lost my tablet somewhere in my flat and have been searching for hours already. It is an Android device, which seems to have wifi enabled (responds to pings), but doesn't seem to react ...
29
votes
2answers
18k views

What does Linux do with existing files in a mount point?

If I attempt to mount a folder that already has files in it, does linux give me an error message or go ahead and show both the mounted filesystem and the files that were already in the folder?
29
votes
4answers
3k views

Windows vs Linux Local Time?

Ever since I started using Linux in dualboot with Windows I noticed that when I rebooted the machine, the time on the other OS was wrong, e.g. it was 12:00 on Linux, then I rebooted and on Windows it ...
29
votes
7answers
31k views

ls -d is not displaying directories. Is there a way to get ls to only display directories instead of files and directories

Is there a way to get ls to only display directories instead of files and directories From the man page. -d, --directory list directory entries instead of contents, and do not ...
29
votes
8answers
191k views

How to set current time on Linux?

Why is the output of the following commands different? root@vmi2115:/var# hwclock Sun 26 Jun 2011 01:21:38 PM CEST -0.273230 seconds root@vmi2495:/var# date Sun Jun 26 15:21:39 CEST 2011 ...
29
votes
9answers
36k views

show keys pressed in linux

in windows there is a program called keyboard jedi that shows what keys are pressed on the keyboard. is there an equivalent for linux?
29
votes
9answers
69k views

How to convert Word (doc) to PDF in linux?

I have a set of files in .doc format, that need to be converted to .pdf format. I am using Ubuntu linux.
29
votes
4answers
23k views

How do I find out what processes are accessing the hard disk in a GNU/Linux-based system?

I'm looking for the equivalent to top for disk access, so I can tell which process(es) are currently reading and/or writing to disk. I'm currently using Ubuntu, but I imagine there's a standard tool ...
29
votes
3answers
52k views

How do I create a 1GB random file in Linux?

I am using the bash shell and would like to pipe the out of the command openssl rand -base64 1000 to the command dd such as dd if={output of openssl} of="sample.txt bs=1G count=1. I think I can use ...
29
votes
2answers
10k views

What's the difference between “adduser” and “useradd”?

I wonder: Why are there these two commands on Debian Linux, with very similar names and functionality? This has always been confusing for me. Is any of them superior to another? Why aren't they ...
29
votes
8answers
9k views

Booting Linux off USB pendrives

Booting a Linux system off USB Pendrives is one of my favorite things. On a laptop we have the following advantages, The Harddisk can be shutdown and that reduces power consumption (hdparm) The ...
29
votes
3answers
73k views

How do I log out of `sudo su`?

I'm using sudo su to start mysql and do some homework with it. When I finish with mysql (or any other command), then I'm still in sudo. How do I "log out", so my prompt changes back from # to $?
29
votes
6answers
96k views

How do I select all text from a file with nano?

I open a file in Ubuntu nano editor from the comand line and I want to copy all the contents of the file so I can paste it in an another application outside the shell. So far I can only copy using ...
29
votes
8answers
26k views

How to know which Linux Distribution I'm using?

How to know which Linux Distribution I'm using? uname -a gives Linux xxxxxx.net 2.6.9-42.0.3.EL.wh1smp #1 SMP Fri Aug 14 15:48:17 MDT 2009 i686 i686 i386 GNU/Linux How can I know this is ...
29
votes
6answers
15k views

Triple (3) Monitors under Linux

I have a 3 monitor setup (each 1680x1050) via an Nvidia NVS440 (2 GPUs, 2 outputs per GPU totalling 4 outputs); this works fine under Windows XP,7 but caused considerable headaches under Linux (Ubuntu ...
28
votes
14answers
32k views

Linux command to repeat a string n times

Is there any built-in linux command that allows to output a string that is n times an input string??
28
votes
1answer
84k views

Give write permissions to multiple users on a folder in Ubuntu

There is a folder that is owned by user tomcat6: drwxr-xr-x 2 tomcat6 tomcat6 69632 2011-05-06 03:43 document I want to allow another user (ruser) write permissions on document folder. The two ...
28
votes
6answers
22k views

How many cores I am using on a Linux Server?

I am just wondering how I can find out in bash how many CPU cores a user is now using on a Linux Server? I am submitting a fair amount of background jobs to the server, so I'd like to write a bash ...
28
votes
6answers
11k views

/usr/local or /opt?

How do you generally proceed for your package installations on Linux, for packages that are not part of your distrib's repos? On my side I am used to install in /opt. But since, I saw this doc on the ...
28
votes
5answers
88k views

How can I add a regular user to the sudoers file?

How can I add more users to the "sudoers" file?
28
votes
5answers
97k views

How to reinstall GRUB2 EFI?

After successfully updating my bios, something went wrong and I ended up with a blinking cursor on the top left corner of a black screen. No errors, no nothing. The bios now only listed a SATA: ...
28
votes
7answers
11k views

Linux: Continuously synchronize files, one way

Scenario: An IDE is set up on a Linux desktop box, editing PHP files locally. Every time I save a file, I want this change to appear on the linux server where Apache is running. The server has ssh ...
28
votes
2answers
25k views

Can GNU Grep output a selected group?

Is it possible to use GNU grep to get a matched group from an expression? Example: echo "foo 'bar'" | grep -oE "'([^']+)'" Which would output "'bar'". But I would like to get just "bar", without ...
28
votes
5answers
3k views

Does running commands verbosely make them slower?

I've found myself using the -v flag for lots of applications less and less (especially for trivial stuff like tar and cp). However, when I did and I was, say, unzipping a large file, it would take ...
28
votes
6answers
20k views

How can I diff two XML files?

On Linux, how could I generate a diff between two XML files? Ideally, I would like to be able configure it to some things strict, or loosen some things, like whitespace, or attribute order. I'll ...
28
votes
2answers
11k views

How to run a minimal Linux inside a running 64-bit Windows 7

On my previous Windows Vista laptop, I used to run Portable Ubuntu Remix for Windows, which is based on coLinux, like the similar andLinux. This worked fairly well with limited system resources (a ...
27
votes
6answers
57k views

play mp3 or wav file via Linux command line

I would like to make an alarm system backed by a Ubuntu (no graphical interface) box, which plays various announcement and alarm audio tracks (.mp3 or .wav) via the command line. For example: $ ...
27
votes
4answers
2k views

How to create a file which is named like a command line argument?

I was wondering how to make a file named as a flag, e.g., if I wanted to make a folder named -a, what commands would do the trick? I tried mkdir '-a', mkdir \-a, and neither worked. I'm on Ubuntu.
27
votes
5answers
43k views

How do I get the size of a Linux or Mac OS X directory from the command-line? [duplicate]

What command do I use to find the size of all the files (recursively) in a Linux or Mac OS X directory?
27
votes
7answers
40k views

How can I keep a process alive after closing the putty session?

I am using putty to interact with Linux server. I have started a process using putty. The process is running and will take 5-6 hours. I want that process to keep running after I close the putty ...
27
votes
4answers
16k views

Looping Through Subdirectories and Running a Command in Each

I have a set of repositories sorted into directories based on their VCS (Git, Mercurial, SVN). With Subversion I was able to run svn update * in the parent directory and it would loop through each ...
27
votes
2answers
27k views

Obtain kernel config from currently running Linux system?

I accidentally deleted my .config for my kernel configuration on Linux, and seem to remember there was a way to retrieve the kernel configuration via the proc filesystem somehow. Is this still ...
27
votes
8answers
61k views

How to get parent PID of a given process in GNU/Linux from command line?

Resolved before asked: cat /proc/1111/status | grep PPid
27
votes
2answers
14k views

scp between two remote hosts from my (third) pc

I have two remote hosts. host1-> 10.3.0.1 host2-> 10.3.0.2 Both run an ssh server. The ssh server listens on port 22 in host1 and on port 6969 in host2. Now, using my local machine, I need to copy ...
27
votes
3answers
8k views

In Linux, how do I truncate command-line output?

If I grep -nr sumthin * in my source code directory, it also spews out very long lines from minified JavaScript or CSS files. I want to get just the first 80 characters per line. For example, a ...
27
votes
4answers
27k views

How do you find the parent process of a zombie process?

How do you find the parent process of zombie processes? When the child process is something where the parent is not entirely obvious... Is there some way to list processes in tree format or ...
27
votes
6answers
35k views

How can I view results of my cron jobs?

I see so many guides on how to run crontab, but what I need right now is to learn how to Find log files about cron jobs Configure what gets logged
27
votes
6answers
59k views

Swap partition size for 4GB RAM

I'm planning to install Ubuntu 9.04 version. How much space should I dedicate for swap partition. I remember setting it to double the RAM size when I installed long back. At that time my RAM was 256 ...
27
votes
1answer
26k views

How can I logout an open, remote SSH session?

I sshed into a Linux machine (bash shell) from a public Windows machine (in our lab) and forgot to log out. I'm now back at my seat in another room and I am too lazy to walk back and log out that ...
27
votes
4answers
15k views

What is the different between 'locate' and 'find' in Linux?

Why there are two so similar command in Linux? and normally what are the circumstances to use each of them?
27
votes
2answers
77k views

What do ALSA devices like “hw:0,0” mean? How do I figure out which to use?

I've searched over and over and can't find any explanation of what "hw:0,0" means. How do I determine the number of my USB audio card? MPD requires me to enter something like this: audio_output { ...
26
votes
2answers
4k views

Why is it so hard to find a file in Ubuntu?

It's very hard to find files in Ubuntu. In Windows, you could just go to C:\Program Files and you would find what you need. In Ubuntu, you must use search to find something you need. Maybe I am ...