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
94 votes
11 answers

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?
Console's user avatar
  • 2,662
69 votes
15 answers

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?
HaiYuan Zhang's user avatar
33 votes
8 answers

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) ...
nik's user avatar
  • 56k
27 votes
5 answers

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.
kroka's user avatar
  • 271
9 votes
1 answer

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 ...
user1952500's user avatar
86 votes
7 answers

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 ...
schuelermine's user avatar
  • 1,125
25 votes
1 answer

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. ...
Xiaodong Qi's user avatar
482 votes
7 answers

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
Scottie T's user avatar
  • 5,021
393 votes
21 answers

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
154 votes
5 answers

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?
Evan Fosmark's user avatar
  • 1,765
32 votes
1 answer

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) ...
kluka's user avatar
  • 2,184
31 votes
3 answers

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 ...
greye's user avatar
  • 921
133 votes
16 answers

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 ...
Robert Munteanu's user avatar
65 votes
14 answers

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?
desolat's user avatar
  • 1,102
8 votes
3 answers

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 ...
Lew Rockwell Fan's user avatar
343 votes
19 answers

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 ...
Peltier's user avatar
  • 6,194
159 votes
16 answers

How to check the health of a hard drive

My SATA drive started clicking and I was unable to access the data. This is the hard drive in question: HITACHI Deskstar T7K250 HDT722525DLA380 (0A31636) 250GB 7200 RPM 8MB Cache SATA 3.0Gb/s 3.5"...
tony_sid's user avatar
  • 14.1k
132 votes
17 answers

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?
Ashot's user avatar
  • 1,459
70 votes
2 answers

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 ...
dding's user avatar
  • 757
11 votes
2 answers

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 ...
reprogrammer's user avatar
4 votes
1 answer

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
216 votes
9 answers

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?
Daryl Spitzer's user avatar
48 votes
4 answers

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?
There Are Four Lights's user avatar
20 votes
1 answer

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?
Raffaele D'Arco's user avatar
8 votes
4 answers

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?
mastan's user avatar
  • 83
559 votes
16 answers

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? ...
Simon's user avatar
  • 6,082
248 votes
7 answers

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?
Deleted's user avatar
  • 4,958
19 votes
3 answers

Debian: creating Windows 10 bootable install USB-drive using terminal (dd)

My goal is so simple, the title says it all, but every way I've tried, I've failed. I've read instructions on various sites (besides here) and they all seem to be missing something... this is what I ...
skaai's user avatar
  • 193
1 vote
1 answer

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. (watch from 12:50) The ...
user3728501's user avatar
  • 2,544
250 votes
8 answers

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.
Malfist's user avatar
  • 3,019
139 votes
4 answers

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 ...
Riking's user avatar
  • 3,333
107 votes
9 answers

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 ...
Suyash Mohan's user avatar
  • 1,275
25 votes
4 answers

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....
NothingsImpossible's user avatar
6 votes
1 answer

localhost and 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 but doesn't work ...
Aabhas Dhaubanja's user avatar
641 votes
41 answers

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 ...
Denilson Sá Maia's user avatar
219 votes
7 answers

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) ...
Yasser Zamani's user avatar
94 votes
12 answers

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 ...
Robert's user avatar
  • 1,194
74 votes
11 answers

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 ...
endolith's user avatar
  • 7,567
30 votes
6 answers

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 [email protected] to connect but would much rather be ...
Mr Fox's user avatar
  • 632
21 votes
7 answers

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

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 ...
David Gras's user avatar
5 votes
3 answers

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 ...
tomsseisums's user avatar
2 votes
1 answer

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 ...
Jason's user avatar
  • 4,036
1 vote
1 answer

btrfs: browsing subvolumes

I am new to btrfs, and confused about subvolumes, after reading the documentation and experimenting on a local system. I have a Linux Mint system with a btrfs root partition. Mint conveniently ...
brainchild's user avatar
18 votes
6 answers

How to detach ssh session without killing a running process?

I started a test filesystem resize on a server through ssh, but totally forgot to do that on a screen session. Now it is running, and my laptop has very slow internet. Is there any way that I can keep ...
xcorat's user avatar
  • 341
620 votes
8 answers

Permissions on private key in .ssh folder?

I changed my permissions in my .ssh folder and now when I use a piece of software that uses my private key, I have to type my password each time. What should my permissions be on my id_rsa file to ...
user avatar
171 votes
16 answers

How to wipe free disk space in Linux?

When a file is deleted, its contents may still be left in the filesystem, unless explicitly overwritten with something else. The wipe command can securely erase files, but does not seem to allow ...
Alex B's user avatar
  • 2,047
68 votes
8 answers

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?
Brandon DuRette's user avatar
62 votes
8 answers

How can I mount a partition from dd-created image of a block device (e.g. HDD) under Linux?

I have an image of the entire disk created using dd. The disk structure follows: kent@cow:~$ sudo fdisk -l Disk /dev/sda: 750.1 GB, 750156374016 bytes 255 heads, 63 sectors/track, 91201 cylinders ...
Deleted's user avatar
  • 4,958
53 votes
6 answers

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 ...
Journeyman Geek's user avatar
  • 128k

2 3 4 5