Most Popular

1500 questions
170
votes
3 answers

Mount cifs Network Drive: write permissions and chown

I have access to a cifs network drive. When I mount it under my OSX machine, I can read and write from and to it. When I mount the drive in ubuntu, using: sudo mount -t cifs -o username=${USER},password=${PASSWORD} //server-address/folder…
Vincent
  • 2,898
170
votes
21 answers

How can I set my default shell to start up tmux

I would like my default bash shell to go straight into tmux instead of my always having to type tmux every time.
170
votes
5 answers

Why is my ethernet interface called enp0s10 instead of eth0?

When I run ifconfig -a, I only get lo and enp0s10 interfaces, not the classical eth0 What does enp0s10 mean? Why is there no eth0?
170
votes
4 answers

What exactly is POSIX?

I see POSIX mentioned often and everywhere, and I had assumed it to be the baseline UNIX standard.. until I noticed the following excerpt on a Wikipedia page: The Open Group The Open Group is most famous as the certifying body for the UNIX …
Peter.O
  • 32,916
169
votes
10 answers

Manually generate password for /etc/shadow

I need to manually edit /etc/shadow to change the root password inside of a virtual machine image. Is there a command-line tool that takes a password and generates an /etc/shadow compatible password hash on standard out?
169
votes
4 answers

-bash: sudo: command not found

I am trying to deploy django app. When I print apt-get update I see W: Unable to read /etc/apt/apt.conf.d/ - DirectoryExists (13: Permission denied) W: Unable to read /etc/apt/sources.list.d/ - DirectoryExists (13: Permission denied) W: Unable to…
user2950593
  • 1,857
168
votes
6 answers

Adding a self-signed certificate to the "trusted list"

I've generated a self-signed certificate for my build server and I'd like to globally trust the certificate on my machine, as I created the key myself and I'm sick of seeing warnings. I'm on Ubuntu 12.04. How can I take the certificate and globally…
Naftuli Kay
  • 39,676
168
votes
7 answers

What does the .d stand for in directory names?

I know many directories with .d in their name: init.d yum.repos.d conf.d Does it mean directory? If yes, from what does this disambiguate? UPDATE: I've had many interesting answers about what the .d means, but the title of my question was not well…
greg0ire
  • 3,005
168
votes
3 answers

If you ^Z from a process, it gets "stopped". How do you switch back in?

I accidentally "stopped" my telnet process. Now I can neither "switch back" into it, nor can I kill it (it won't respond to kill 92929, where 92929 is the processid.) So, my question is, if you have a stopped process on linux command line, how do…
bobobobo
  • 1,805
167
votes
7 answers

Why does find -mtime +1 only return files older than 2 days?

I'm struggling to wrap my mind around why the find interprets file modification times the way it does. Specifically, I don't understand why the -mtime +1 doesn't show files less than 48 hours old. As an example test I created three test files with…
Mike B
  • 8,900
167
votes
9 answers

Combine the output of two commands in bash

Is it possible to combine output from these two commands? node ~/projects/trunk/index.js python ~/projects/trunk/run.py run Neither command exits so I'm not sure how to do this.
chovy
  • 2,069
167
votes
9 answers

How to run grep with multiple AND patterns?

I would like to get the multi pattern match with implicit AND between patterns, i.e. equivalent to running several greps in a sequence: grep pattern1 | grep pattern2 | ... So how to convert it to something like? grep pattern1 & pattern2 &…
greenoldman
  • 6,176
167
votes
4 answers

Where should a local user executable be placed (under $HOME)?

I have an executable for the perforce version control client (p4). I can't place it in /opt/local because I don't have root privileges. Is there a standard location where it needs to be placed under $HOME? Does the File System Hierarchy have a…
user640378
  • 1,963
167
votes
3 answers

When to use /dev/random vs /dev/urandom

Should I use /dev/random or /dev/urandom? In which situations would I prefer one over the other?
Tom Hale
  • 30,455
167
votes
1 answer

Understanding the output of --info=progress2 from rsync

If I run rsync with --info=progress2, I get an output like 105.45M 13% 602.83kB/s 0:02:50 (xfr#495, ir-chk=1020/3825) But what do the single numbers mean? I haven't found a matching entry in the man page. The first number seems to be the…
muffel
  • 2,818