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
93 votes
11 answers
28k 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?
  • 2,652
69 votes
15 answers
332k 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
8 answers
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 hard disk drive can be shutdown and that reduces power consumption (hdparm) ...
  • 54.9k
24 votes
4 answers
49k 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.
  • 241
8 votes
1 answer
3k 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 ...
24 votes
1 answer
28k 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. ...
451 votes
7 answers
219k 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
  • 4,711
375 votes
21 answers
479k 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 ...
user avatar
149 votes
5 answers
176k 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?
  • 1,715
32 votes
1 answer
191k 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) ...
  • 2,104
30 votes
3 answers
134k 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 ...
  • 911
133 votes
16 answers
172k 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 ...
62 votes
14 answers
105k 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?
  • 1,072
7 votes
3 answers
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 ...
320 votes
18 answers
275k 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 ...
  • 5,844
153 votes
13 answers
497k 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 ...
  • 13.6k
131 votes
17 answers
171k 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?
  • 1,449
42 votes
6 answers
41k views

How to set default user for manually installed WSL distro?

I have cloned a WSL distro using wsl --export and wsl --import, but now, running wsl newdistro always logs me in as root. I understand that the lxrun command is deprecated and want to avoid it. The ...
11 votes
2 answers
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
9 answers
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?
64 votes
2 answers
120k 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 ...
  • 687
45 votes
4 answers
33k 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?
15 votes
1 answer
30k 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?
3 votes
1 answer
4k 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 ...
user avatar
524 votes
16 answers
405k 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? ...
  • 5,732
7 votes
4 answers
161 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?
  • 73
1 vote
1 answer
461 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 ...
  • 2,107
244 votes
8 answers
22k 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.
  • 2,959
138 votes
4 answers
142k 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 ...
  • 3,323
24 votes
4 answers
37k 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....
4 votes
1 answer
12k 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 ...
230 votes
7 answers
223k views

When should I use /dev/shm/ and when should I use /tmp/?

When should I use /dev/shm/ and when should I use /tmp/? Can I always rely on them both being there on UNIX?
  • 4,648
211 votes
7 answers
274k 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) ...
93 votes
12 answers
554k 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 ...
  • 1,175
74 votes
11 answers
97k 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 ...
  • 7,300
52 votes
3 answers
6k views

Do I really need recursive chmod to restrict access to a folder?

If I want to restrict access to a folder secret on a shared machine, do I really need recursive chmod on the folder chmod -R g=,o= secret or is chmod on the folder sufficient? chmod g=,o= secret ...
  • 629
29 votes
6 answers
86k 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 ...
  • 612
21 votes
7 answers
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 ...
6 votes
1 answer
2k 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 ...
5 votes
3 answers
6k 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 ...
2 votes
1 answer
1k views

DDRescue - Did I do the wrong command which is causing it to take longer then expected

I am running the following command on a 500GB drive: ddrescue --force --direct /dev/sde2 /home/backups/sde2.img sde2_logfile.ddrescue However, the time has been almost 24hrs and all it has done so ...
  • 3,946
126 votes
8 answers
179k views

VirtualBox to use dual monitors

I am running Kubuntu Hardy Heron, with a dual monitor setup, and have VirtualBox on it running Windows XP in seamless mode. My problem is, I can't get VirtualBox to extend to the second monitor.  How ...
  • 3,052
97 votes
8 answers
358k 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 ...
  • 1,175
65 votes
8 answers
45k 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?
53 votes
6 answers
40k 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 ...
  • 125k
48 votes
11 answers
65k 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.
  • 7,077
46 votes
3 answers
30k 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 ...
  • 585
46 votes
2 answers
70k 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 ...
  • 1,876
46 votes
4 answers
14k 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 ...
  • 3,191
35 votes
3 answers
182k 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 ...
  • 7,680

1
2 3 4 5
77