Skip to main content

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
95 votes
11 answers
30k 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?
Console's user avatar
  • 2,672
11 votes
1 answer
4k 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 ...
user1952500's user avatar
70 votes
15 answers
342k 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?
HaiYuan Zhang's user avatar
33 votes
8 answers
15k 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) ...
nik's user avatar
  • 56.5k
28 votes
5 answers
62k 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.
kroka's user avatar
  • 281
26 votes
1 answer
31k 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. ...
Xiaodong Qi's user avatar
101 votes
8 answers
159k 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 ...
schuelermine's user avatar
  • 1,317
489 votes
7 answers
260k 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
Scottie T's user avatar
  • 5,091
402 votes
21 answers
562k 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
164 votes
5 answers
212k 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?
Evan Fosmark's user avatar
  • 1,865
9 votes
3 answers
16k 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 ...
Lew Rockwell Fan's user avatar
32 votes
1 answer
192k 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) ...
kluka's user avatar
  • 2,224
31 votes
3 answers
135k 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 ...
greye's user avatar
  • 921
24 votes
3 answers
28k views

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
  • 343
133 votes
16 answers
175k 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 ...
Robert Munteanu's user avatar
65 votes
14 answers
126k 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?
desolat's user avatar
  • 1,102
352 votes
19 answers
321k 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 ...
Peltier's user avatar
  • 6,324
165 votes
16 answers
568k views

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.5k
131 votes
17 answers
179k 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?
Ashot's user avatar
  • 1,449
74 votes
2 answers
139k 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 ...
dding's user avatar
  • 797
11 votes
2 answers
4k 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 ...
reprogrammer's user avatar
4 votes
1 answer
5k 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
1 vote
1 answer
1k 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 ...
user3728501's user avatar
  • 2,954
574 votes
16 answers
489k 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? ...
Simon's user avatar
  • 6,232
216 votes
9 answers
412k 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?
Daryl Spitzer's user avatar
48 votes
4 answers
40k 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?
There Are Four Lights's user avatar
22 votes
1 answer
58k 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?
Raffaele D'Arco's user avatar
8 votes
4 answers
245 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?
mastan's user avatar
  • 83
269 votes
7 answers
276k 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?
Deleted's user avatar
  • 5,208
7 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 ...
David Gras's user avatar
2 votes
1 answer
28k views

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
253 votes
8 answers
24k 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.
Malfist's user avatar
  • 3,059
140 votes
4 answers
145k 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 ...
Riking's user avatar
  • 3,343
111 votes
10 answers
411k 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 ...
Suyash Mohan's user avatar
  • 1,315
25 votes
4 answers
41k 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....
NothingsImpossible's user avatar
644 votes
41 answers
559k 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 ...
Denilson Sá Maia's user avatar
220 votes
7 answers
297k 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) ...
Yasser Zamani's user avatar
95 votes
12 answers
609k 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 ...
Robert's user avatar
  • 1,204
75 votes
11 answers
100k 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 ...
endolith's user avatar
  • 7,561
30 votes
6 answers
109k 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 [email protected] to connect but would much rather be ...
Mr Fox's user avatar
  • 632
21 votes
7 answers
45k 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
21k 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 ...
Aabhas Dhaubanja's user avatar
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 ...
tomsseisums's user avatar
4 votes
1 answer
7k views

How to execute complex command line over ssh?

I sometimes want to get the env of a docker container running on a remote host. To do this I log into the host: ssh [email protected] and then I run this command: sudo docker exec -it `sudo ...
kramer65's user avatar
  • 1,424
3 votes
1 answer
2k 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 ...
Jason's user avatar
  • 4,066
20 votes
6 answers
56k views

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
  • 361
646 votes
7 answers
926k views

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
176 votes
16 answers
361k views

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,097
69 votes
8 answers
52k 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?
Brandon DuRette's user avatar
65 votes
8 answers
137k views

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
  • 5,208

1
2 3 4 5
81