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.

Filter by
Sorted by
Tagged with
92
votes
11answers
26k 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?
69
votes
15answers
322k 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?
32
votes
8answers
14k 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 ...
23
votes
1answer
26k 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. ...
17
votes
3answers
41k 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.
8
votes
1answer
2k 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 ...
352
votes
21answers
436k 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 ...
143
votes
5answers
171k 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?
404
votes
7answers
188k 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
32
votes
1answer
190k 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) ...
30
votes
3answers
129k 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 ...
56
votes
13answers
92k views

Batch convert encoding in files

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 can I do the mass files job?
41
votes
4answers
26k 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?
294
votes
18answers
249k 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 ...
133
votes
16answers
169k 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 ...
130
votes
17answers
158k 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?
144
votes
13answers
477k 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
21k views

How to create a SOCKS proxy with ssh?

I want to use my computer as a SOCKS proxy. Do you just have to do ssh -D port_number hostname? Do I have to put my Linux username as the hostname?
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 ...
215
votes
9answers
410k 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?
3
votes
1answer
3k views

Bash terminal not wrapping text correctly [duplicate]

I am using the gnome-terminal with bash, and when I have a command that should go over the line, it just stays on the same line. So instead of: echo "abcdefghijklmnopqrstuvwxyz" I would get ...
7
votes
4answers
149 views

Why does `find` in Linux skip expected results when `-o` is used?

Why in Linux (Debian 8) touch 1.cpp 1.h find . -name "*.cpp" -o -name "*.h" -exec echo {} \; outputs only 1.h while find . -name "*.cpp" -o -name "*.h" outputs both? Is it a bug or feature?
481
votes
16answers
349k 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? ...
241
votes
8answers
21k 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.
138
votes
4answers
140k 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 ...
58
votes
2answers
107k views

What does dd conv=sync,noerror do?

What's the effect of adding conv=sync,noerror when backing up an entire hard disk onto an image file? Is conv=sync,noerror a requirement when doing forensic stuff? If so, why is it the case with ...
24
votes
4answers
36k 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 any....
7
votes
3answers
14k views

find: "-exec rm {} \;" vs. "-delete" - why is the former widely recommended?

Why is it that that articles on find always use -exec rm {} \; in cases where the shorter and easier to type and read -delete seems, as far as I can tell, to work just as well? I realize there are ...
209
votes
7answers
262k 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
18answers
260k views

Unix/Linux find and sort by date modified

How can I do a simple find which would order the results by most recently modified? Here is the current find I am using (I am doing a shell escape in PHP, so that is the reasoning for the variables): ...
74
votes
11answers
95k 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 ...
92
votes
12answers
509k 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 ...
21
votes
7answers
44k 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 ...
5
votes
3answers
5k 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 ...
3
votes
1answer
4k views

localhost and 127.0.0.1 working but not ip address in wsl windows 10

I recently switched from Linux to WSL2 (Ubuntu 20.04) on Windows 10. When I run any NodeJs application or a server like Apache or Nginx everything works fine on localhost or 127.0.0.1 but doesn't work ...
1
vote
1answer
288 views

Beaglebone Black filesystem resize - incorrect information? "just delete the partition and make a new one"

I am working remotely with a beaglebone black system. I found this information on youtube about expanding the root filesystem. https://www.youtube.com/watch?v=FK6wfV_19ac (watch from 12:50) The ...
92
votes
8answers
338k views

How to access a BitLocker-encrypted drive in Linux?

I have a laptop running Windows 7 Ultimate. I have encrypted my drives using BitLocker. Now I have also installed Lubuntu along with Windows. But my encrypted drives are not visible in Linux. How ...
47
votes
11answers
63k 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.
60
votes
8answers
41k 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?
45
votes
2answers
69k 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 ...
53
votes
6answers
38k 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 ...
26
votes
6answers
72k 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 ...
45
votes
3answers
28k 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 ...
21
votes
1answer
12k views

Why does `echo -e "\\\SOME_TEXT"` show only one backslash?

Could some one explain what is happening behind the scenes in character escaping in Linux shell? I tried the following and googled a lot, without any success in understanding what (and how) is going ...
14
votes
5answers
56k views

Filesystem to use for external hard drive to be used with Mac, Linux and Windows machines [duplicate]

Possible Duplicate: Cross-platform file system I have a rather large USB drive that I'd like to be able to use across the different machines I own. I'm having a hard time figuring out what would ...
10
votes
3answers
11k 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 ...
4
votes
1answer
4k views

How can the bash shell on Window be completely reset?

I'm new to Unix but interested learn, so started trying to use bash/Ubuntu on Windows. Unfortunately, bash crashed and now bash/Ubuntu seems to be broken as most folders are now missing from the ...
9
votes
2answers
17k 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?
6
votes
1answer
1k views

Why does "ls .." show real parent content when I'm inside a symbolic link directory?

$ cd ~ $ ln -s /real/folder symbolic_link $ cd symbolic_link $ cd .. $ ls -l symbolic_link -> /real/folder/ $ cd symbolic_link $ ls -l .. folder In other words, why the behaviour of cd .. is ...
1
vote
2answers
2k views

Corrupted NTFS files (no such file or directory); can I fix them under Linux?

I am trying to copy files to my external hard drive using PartedMagic. My computer won't boot, so we are sending it in to get repaired. I've tried EVERYTHING but can't get it to boot into any desktop ...

1
2 3 4 5
74