Stack Exchange Network

Stack Exchange network consists of 174 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]

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

82
votes
10answers
20k views

Cross-platform file system

I would like my external drives to be readable and writable from Linux, Mac OS X and Windows. FAT32 works, but the 4 GB file size limit is a showstopper these days. Are there any alternatives?
31
votes
8answers
12k 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 ...
63
votes
15answers
252k views

How to recover a removed file under Linux?

By accident, I used rm on a file I didn't want to delete. Is there a way that I can get it back under Linux?
285
votes
18answers
304k views

How do I detach a process from Terminal, entirely?

I use Tilda (drop-down terminal) on Ubuntu as my "command central" - pretty much the way others might use GNOME Do, Quicksilver or Launchy. However, I'm struggling with how to completely detach a ...
132
votes
4answers
145k views

Finding the process that is using a certain port in Linux

I'd like to be able to find out which process is currently using a certain port in Linux. Is there any way to do this?
32
votes
1answer
178k views

How can I add Linux to the new Windows 8 boot manager?

Which OSes can be put into the new bootloader that Windows 8 provides? It seems to be quite pretty and consistent with the rest of the new Windows 8 design, so it would be cool to put Linux (Ubuntu) ...
23
votes
4answers
80k views

Can two users simultaneously share one pc

It's easy to have multiple user accounts on one computer and even switch between accounts without logging off. It is also possible to have more than one display connected to a single computer. Is it ...
45
votes
10answers
55k 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?
130
votes
17answers
156k views

Linux utility for finding the largest files/directories [closed]

I'm looking for a program to show me which files/directories occupy the most space, something like: 74% music \- 60% music1 \- 14% music2 12% code 13% other I know that it's possible in KDE3, but ...
120
votes
17answers
123k views

How to delete all files in a directory except some?

I need to delete all files in a directory, but exclude some of them. For example, in a directory with the files a b c ... z, I need to delete all except for u and p. Is there an easy way to do this?
105
votes
11answers
378k 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 ...
10
votes
1answer
11k views

Shutdown Windows 10 truly for a dual booting system

It seems that "Shut down" in Windows 10 actually means "Shut down and hibernate". This has caused my NTFS partitions cannot be automatically loaded on Linux (Ubuntu 16.04) on my dual-booting laptop. ...
199
votes
9answers
395k views

How do I find out what version of Linux I'm running?

Is there a way to determine what version (distribution & kernel version, I suppose) of Linux is running (from the command-line), that works on any Linux system?
11
votes
2answers
3k views

Make grub keep its default boot under kernel updates

I dual-boot my machine and I want it to default to boot into windows so that whenever I restart the machine remotely from my home it will be able to get back into Windows (instead of Ubuntu). The ...
236
votes
7answers
108k views

What is the difference between executing a Bash script vs sourcing it?

What is the difference between executing a Bash script like A and sourcing a Bash script like B? A > ./myscript B > source myscript
209
votes
15answers
157k views

How to reliably keep an SSH tunnel open?

I use an SSH tunnel from work to go around various idotic firewalls (it's ok with my boss :)). The problem is, after a while the ssh connection usually hangs, and the tunnel is broken. If I could at ...
29
votes
2answers
17k views

How to delete a file with a weird name?

I wrote a program that uses POSIX memory-mapping function (mmap) The program takes a file (a.dat) and memory-maps it for reading/writing. Due to errors in the program, every time I run the program a ...
5
votes
3answers
14k views

Clone only space in use from hard disk

Can I use dd, rsync, clonezilla or any tool to clone only space in use in my hard disk in Linux? I need to do a backup from a 1 TB HD (with only 2 GB space in use) into a 500 GB HD.
109
votes
4answers
108k 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 ...
71
votes
11answers
90k views

Automatically mount external drives to /media/LABEL on boot without a user logged in?

This question is similar, but kind of the opposite of what I want. I want external USB drives to be mounted automatically at boot, without anyone logged in, to locations like /media/<label>. I ...
45
votes
2answers
65k views

Can I create an SSH user which can access only certain directory?

I have a Virtual Private Server which I can connect to using SSH with my root account, being able to execute any linux command and access all the disk area, obviously. I would like to create another ...
49
votes
6answers
32k views

Getting macro keys from a Razer BlackWidow to work on Linux

I picked up a Razer BlackWidow Ultimate that has additional keys meant for macros that are set using a tool that's installed on Windows. I'm assuming that these aren't some fancypants joojoo keys and ...
25
votes
4answers
83k views

What filesystem to use when using both Windows and Linux? [duplicate]

I will be buying a 2TB hard drive soon, and would like to use it as media storage. I would like to be able to read/write from both Windows (version 7, 64bit) and Ubuntu Linux, and I need support for ...
21
votes
8answers
43k views

How to move from one drive to another that's a different size?

I've run into this scenario a few time: I need to replace a drive because I need more space, it's having problems, moving to a new box, etc. What's the best way to copy data from one partition size ...
178
votes
7answers
212k views

Why does Ctrl + V not paste in Bash (Linux shell)?

When I copy something to the clipboard and press Ctrl + V in Bash, nothing happens; However, right clicking and selecting Paste does the job. Why? Is there any reasonable issue (I'm sure there is) ...
208
votes
8answers
17k views

What do the parentheses and number after a Unix command or C function mean?

I keep seeing parentheses and a number after a command in Unix or Linux or C function. For example: man(8), ftok(2), mount(8), etc. What do these mean? I see them in man too.
40
votes
9answers
57k 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.
76
votes
12answers
348k views

PuTTY Network Error: Software caused connection abort

I have a strange problem: When I'm using PuTTY with SSH connecting to a Linux server hosted in VMware on my local Windows 7, I often get the error saying "Network error: Software caused ...
50
votes
7answers
27k views

How can I log all process launches in Linux?

I would like to get a log of all processes that are launched with the time that they were launched and the arguments they were launched with. Is this possible in Linux?
14
votes
4answers
7k views

Where is the Linux Subsystem's filesystem located in Windows 10?

It's pretty clear that Windows' 10 "host" filesystem is mounted at /mnt/c/ from "Linux" perspective of view. But is it possible to get an access to "Linux" filesystem from Windows? If so, where it is?
11
votes
2answers
43k views

How to change user in WinSCP?

I'm using WinSCP to access Unix computers. How can I change user after I have logged into a Unix server using WinSCP? E.g. I have personal account in Unix computer A. I can log into this computer ...
7
votes
2answers
14k views

How can I get access to EXT2, EX3 and EXT4 partitions on Windows 7?

I tried all programs recommended to mount Linux partitions like EXT2 or EXT3 or even EXT4 but no one can do well on Windows 7 32 bit. I want to access read-write, is there a program that can do this?
387
votes
33answers
279k views

How to execute a command whenever a file changes?

I want a quick and simple way to execute a command whenever a file changes. I want something very simple, something I will leave running on a terminal and close it whenever I'm finished working with ...
174
votes
8answers
544k views

How can I give write-access of a folder to all users in linux?

I installed apache2 on Ubuntu just now, and noticed that the /var/www folder is protected. I can just sudo everything but I would rather just give it write access. How can I do this? I tried sudo ...
39
votes
7answers
102k views

How to stop kernel messages from flooding my console?

I'm using Centos 6, rsyslog logging. Console is flooded with kernel messages. Klogd is not running (I'm using rsyslog) Rsyslog config does not direct anything to the console Even tried stopping ...
110
votes
12answers
111k views

Undo an “rm -rf ~” command?

I had a folder I didn't want named '~', so from the command line I typed rm -rf ~ and accidentally deleted my home folder (since ~ resolved to /home/username). Is there any way back or do I ...
15
votes
6answers
40k views

Connect to Linux by name rather than IP

I'm new to Linux (currently running Ubuntu 10.04) and I have just finished setting up SSH access to my Linux Machine. Currently, I have to use ssh root@x.x.x.x to connect but would much rather be ...
53
votes
3answers
38k views

Is there a way to find out what application using most of bandwidth in Linux? [closed]

I'm looking for an utility that could show me how much of a bandwidth each process are using. It should just print the data and exit as I want to feed that list into conky.
26
votes
7answers
52k views

Can I boot Linux from a VHD?

Is there some way to boot a Linux system from a VHD in Windows 7? If there is a way, how do I put it there in the first place? EDIT: To clarify, I'm not trying to run Linux in a VM. I'm trying to ...
22
votes
4answers
28k views

How to correct 512-byte sector MBR on a 4096-byte sector disk?

Final update: I already knew what I needed to do to fix this problem; I just didn't know how to do it. I was hoping there would be some ready-made tool to do that automatically - but couldn't find ...
22
votes
9answers
45k views

Simple mdadm RAID 1 not activating spare

I had created two 2TB HDD partitions (/dev/sdb1 and /dev/sdc1) in a RAID 1 array called /dev/md0 using mdadm on Ubuntu 12.04 LTS Precise Pangolin. The command sudo mdadm --detail /dev/md0 used to ...
19
votes
6answers
78k views

Make a bootable USB to install Windows XP from Linux

I have a Dell Inspiron Mini 9 with only Ubuntu installed. I want to install Windows XP also, but I don't have and can't get an external CD drive, so I need to make a Windows installation from the USB. ...
30
votes
3answers
146k views

undo Linux's rm? [duplicate]

Possible Duplicate: UNDO LINUX Trash Command Hi, Is there any simple way to undo an rm command? The question is purely theoretical; I have NEVER deleted the log of a benchmark queue who took ...
10
votes
3answers
7k views

Is there any way to execute something when closing the laptop's lid?

I'm wondering if there is any way to execute a program, run some command or anything else when closing the laptop's lid. My question aims to be generic, both for Windows and Linux. Something useful ...
8
votes
1answer
12k views

Can the Windows 7 system reserved partition be deleted without problems?

Ok, I recently got this netbook that came with Windows 7 and wanted to install Linux on it as well for a dual-boot. It came with four primary partitions on a 250 GB HDD, those being: 15 GB recovery ...
6
votes
5answers
5k views

Join multiple MP3 files (lossless)

How do you join multiple MP3 files into one? "cat" and "mp3wrap" are no good as they produce non standard MP3 files. I know I can use audacity, but when you have 1000's of MP3 files to join into one,...
7
votes
2answers
4k views

Serve up PC hard drive as USB mass storage

Is there a software package available that can serve up a hard-drive internal to a PC and make it available over USB to other USB Master nodes as mass storage? Ex: take your C: or /dev/hda drive on a ...
4
votes
3answers
4k views

Possibly a dying hard drive, but reads, writes work - unsure about log entries

I recently received a Linux box having problems with Samba share - first off, couldn't connect, second ls -la showed some I/O error (close to what can be seen below) with no listing. Now, I've fully ...
5
votes
1answer
326 views

Uses of single-partition disk configuration

I see in my company's IT installations that there are numerous disks with one partition occupying all of the space on disk. There is typically something like a /dev/sdb with a partition /dev/sdb1, and ...
286
votes
12answers
184k views

Reload a Linux user's group assignments without logging out

When assigning a user's secondary group list using: # usermod -G <grouplist> <user> is it possible to force this group assignment to take effect without logging out all running sessions? ...