Greatest Hits

25
votes
13answers
215k views

How to get a list of all IP addresses (and ideally device names) on a LAN?

Our network gave an error that there was an IP address conflict and I'd like to find what all the device IP addresses are. (I've also had need of that before). (update/clarification:I'm looking for a ...
50
votes
3answers
114k views

How to sleep in a batch file?

How to pause execution for a while in a Windows batch file between a command and the next one?
180
votes
10answers
82k views

How to tell which local branch is tracking which remote branch in Git?

I would like to know if there's a way to tell which local branch is tracking which remote branch in Git. I'm using one remote server, which is named "origin".
210
12
votes
6answers
110k views

Get IP addresses and Computer Names in the Same Network

What is the command that can be used to get the IP address and the names of the computers that are located in the same network? I am running Windows
141
votes
2answers
54k views

What exactly do the colors in htop status bars mean?

By default, htop shows colored status bars for processors, memory, and swap. From left to right, the bars are colored green, blue, yellow, and red depending on some thresholds. What does it mean when ...
88
votes
10answers
162k views

How to refresh hosts file without rebooting

On Windows, how do you refresh the hosts file without rebooting?
169
42
votes
8answers
108k views

“Add correct host key in known_hosts” / multiple ssh host keys per hostname?

Trying to ssh into a computer I control, I'm getting the familiar message: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @ ...
159
112
votes
8answers
130k views

How do I share a Git repository with multiple users on a machine?

I have a Git repository on a staging server which multiple developers need to be able to pull to. git-init seems to have a flag very close to what I'm looking for: --shared, except I'd like multiple ...
27
votes
3answers
35k views

EPEL Repo for CentOS 6 causing error

I've got a VM running CentOS 6 (64bit) and I'm attempting to add the EPEL repo like usual to install various packages as I do quite regularly. Today, I'm experiencing some strange errors yet I'm ...
34
votes
2answers
119k views

Can I have multiple DHCP servers on one network?

This is a Canonical Question about Redundant DHCP Servers. Is it possible to have more than one DHCP server on the same LAN? What are the implications of doing this? What happens if there is ...
105
votes
4answers
105k views

What's the difference between ip address 0.0.0.0 and 127.0.0.1?

I do know that 127.0.0.1 ~ 127.255.255.254 are the loopback IP addresses for most modern operating systems and we could use these IP addresses to refer to our own computer. But what's 0.0.0.0? It ...
143
votes
5answers
202k views

MySQL: Bind to more than one IP address?

Is there a secret way to bind MySQL to more than one IP address? As far as I can see the bind-address parameter in the my.cnf does not support more than one IP and you can't have it more than once.
58
votes
7answers
119k views

Find name of Active Directory domain controller

How can I find out the name/IP address of the AD domain controller on my network?
85
votes
5answers
122k views

How do you add a Windows environment variable without rebooting?

This is probably an easy answer, but I have never been able to find it by googling. I simply would like to add an Environment variable to a Windows machine (desktop or server) and be able to use it ...
168
votes
6answers
156k views

How to assign permissions to ApplicationPoolIdentity account

In IIS 7 on Windows Server 2008, application pools can be run as the "ApplicationPoolIdentity" account instead of the NetworkService account. How do I assign permissions to this ...
55
votes
13answers
143k views

Using wget to recursively download whole FTP directories

I want to copy all of the files and folders from one host to another. The files on the old host sit at /var/www/html and I only have FTP access to that server, and I can't TAR all the files. Regular ...
68
votes
2answers
53k views

How do VLANs work?

What are VLANs? What problems do they solve? I'm helping a friend learn basic networking, as he's just become the sole sysadmin at a small company. I've been pointing him at various questions/answers ...
42
votes
3answers
78k views

How do I upgrade from PHP 5.3 to PHP 5.4.6 in Ubuntu?

Is there an easy way out to get the latest PHP? I have tried updating my package but none of it has 5.4.6 yet... if anyone knows on how to do it quickly, can it be shared here? I've tried compiling ...
146
36
votes
7answers
84k views

Why is the response on localhost so slow?

I am working on a tiny little PHP project for a friend of mine, and I have a WAMP environment setup for local development. I remember the days when the response from my local Apache 2.2 was immediate. ...
12
votes
3answers
64k views

CentOS 7 Firewall Configuration

In CentOS 6 I could type setup from the command line and I would be presented with a set of tools, one of them being Firewall configuration. I can still do this in CentOS 7, except the list no longer ...
1
vote
4answers
55k views

Windows Server 2012 r2 Standard Activation Issue - MAK license

I am trying to activate MS Server 2012 R2 Standard and I'm having issues. I have installed the software from the ISO file I downloaded from the volume licensing site. I have learned that this file ...
8
votes
10answers
80k views

How to remotely see what users are logged into Windows 7 or Vista

I need to login to a remote into either a Win7 or Vista computer but when I connect I get a Logon Message "Another user is currently logged on..." but it does not specify who. I have a domain ...
86
votes
4answers
94k views

how to download the ssl certificate from a website?

I want to download the ssl certificate from, say https://www.google.com, using wget or any other commands. Any unix command line? wget or openssl?
95
votes
10answers
93k views

How to zip/unzip files in Powershell?

Is there a one-liner that will zip/unzip files (*.zip) in PowerShell?
79
votes
3answers
66k views

Meaning of the buffers/cache line in the output of free

Why does my server show total used free shared buffers cached Mem: 12286456 11715372 571084 0 81912 6545228 -/+ buffers/cache: 5088232 7198224 ...
168
votes
3answers
116k views

What's the best way of handling permissions for apache2's user www-data in /var/www?

Has anyone got a nice solution for handling files in /var/www? We're running Name Based Virtual Hosts and the apache2 user is www-data. We've got two regular users & root. So when messing with ...
105
votes
15answers
114k views

Copying a large directory tree locally? cp or rsync?

I have to copy a large directory tree, about 1.8 TB. It's all local. Out of habit I'd use rsync, however I wonder if there's much point, and if I should rather use cp. I'm worried about permissions ...
85
votes
5answers
226k views

Does Windows have a built-in ZIP command for the command line?

Since Windows Explorer (since at least Windows XP) has some basic support for ZIP files, it seems like there should be a command-line equivalent, but I can't seem to find any sign of one. Does ...
55
votes
10answers
169k views

Run Oracle SQL script and exit from sqlplus.exe via command prompt

I would like to run an Oracle script through SQL Plus via a Windows command prompt. The script does not contain an "exit" command, but I would still like SQL Plus to exit, returning control to the ...
9
votes
9answers
73k views

Get list of AD groups a user is a member of

Suppose I have the user id of a user in Active Directory. I'd like to get a list of all AD groups in which that user is currently a member of. How can I do this from the Windows command line? I've ...
29
votes
7answers
148k views

How to check the physical status of an ethernet port in Linux?

I want to check if a specified ethX is physically up or down. How do I do that with the command line?
41
votes
6answers
72k views

How can I kill all stopped jobs?

When I try to exit from my Linux server I get the message: There are stopped jobs. : Is there a single command to kill these?
170
42
votes
12answers
43k views

`mysql_upgrade` is failing with no real reason given

I'm upgrading from MySQL 5.1 to 5.5, running mysql_upgrade and getting this output: # mysql_upgrade Looking for 'mysql' as: mysql Looking for 'mysqlcheck' as: mysqlcheck FATAL ERROR: Upgrade failed ...
51
votes
7answers
115k views

How do you restart php-fpm?

I need to reload my php.ini and there's nothing in the help dialog about restarting it.
24
votes
5answers
201k views

How to correct Postfix' 'Relay Access Denied'?

This morning, in order to correct a problem with a name mismatch in the security certificate, I followed the recommended steps from How to fix mail server SSL?, but now, when attempting to send an ...
73
votes
3answers
82k views

Why is my crontab not working, and how can I troubleshoot it?

This is a Canonical Question about using cron & crontab. The answer for 'Why is my crontab not working, and how can I troubleshoot it?' can be seen below. This addresses the cron system with ...
111
54
votes
6answers
195k views

How can I read pcap files in a friendly format?

a simple cat on the pcap file looks terrible: $cat tcp_dump.pcap ?ò????YVJ? JJ ?@@.?E<??@@ ?CA??qe?U????иh? .Ceh?YVJ?? JJ ?@@.?E<??@@ ...
16
votes
3answers
103k views

How to delete domain user profile from a computer?

I'm wondering how to safely remove a domain user profile from a computer that is a part of a domain. I don't want to delete the account from the domain itself, I just need to remove the profile from ...
15
votes
11answers
181k views

How can I find out if a port is opened or not?

I have installed Apache server on my Windows 7 computer. I was able to display the default index.php by typing http://localhost/ in the address line of my browser. However, I am still unable to see ...
33
votes
7answers
41k views

Poodle: Is disabling SSL V3 on server really a solution?

I've been reading all day about the Poodle vulnerability and it I am bit confused now vs Security and Revenue. If I disable SSL V3 on Server (SSL V2 and V3 both will be disabled for Apache) clients ...
20
votes
7answers
84k views

How do I remove login credentials for a network location in Win7?

I just tried to access a folder like so: \\somecomputeronmynetwork\somelocation$ When going to this location I'm prompted for a user name and password. I put one in, and it let me in fine. Now I ...
86
votes
9answers
122k views

How do I get current Unix time in milliseconds using bash?

How do I get the current Unix time in milliseconds (i.e number of milliseconds since Unix epoch January 1 1970)?
128
64
votes
7answers
86k views

How to determine JAVA_HOME on Debian/Ubuntu?

On Ubuntu it is possible to have multiple JVMs at the same time. The default one is selected with update-alternatives. But this does not set the JAVA_HOME environment variable, due to a debian policy. ...
288
votes
6answers
76k views

How does IPv4 Subnetting Work?

This is a Canonical Question about IPv4 Subnets. Related: How does IPv6 subnetting work and how does it differ from IPv4 subnetting? How does Subnetting Work, and How do you do it ...
69
votes
6answers
119k views

List all DNS records in a domain using dig?

My company runs an internal DNS for "mycompany.com" There is a machine on the network that I need to find, but I've forgotten its name. If I could see a list, it would probably jog my memory. How ...
12
votes
7answers
123k views

How to resolve a “driver failure” error in the Cisco VPN client connecting from a Windows 7 client

I have recently upgraded my laptop from Windows Vista SP1 to Windows 7 Professional. After the upgrade, if I try to use the Cisco VPN client to connect to a network, I get this message: Secure VPN ...
19
votes
4answers
186k views

How to find time server in a domain?

In a Windows domain PDC isn't necessarily the domain time server. How could I identify the authoritative time server?
25
votes
12answers
119k views

How to find out details about hardware on the Linux machine?

-i.e - how to get a full list of hardware components in command line (on a machine with no window system) Thank you.
77
votes
6answers
81k views

Can I automatically add a new host to known_hosts?

Here's my situation: I'm setting up a test harness that will, from a central client, launch a number of virtual machine instances and then execute commands on them via ssh. The virtual machines will ...
70
votes
9answers
80k views

Finding out what user Apache is running as?

I want to secure a file upload directory on my server as described beautifully here, but I have one problem before I can follow these instructions. I don't know what user Apache is running as. I've ...