Greatest Hits

71
votes
10answers
130k views

How to refresh hosts file without rebooting

On Windows, how do you refresh the hosts file without rebooting?
135
73
votes
8answers
32k views

Heartbleed: how to reliably and portably check the OpenSSL version?

I was looking at a reliable and portable way to check the OpenSSL version on GNU/Linux and other systems, so users can easily discover if they should upgrade their SSL because of the Heartbleed bug. ...
9
votes
6answers
87k 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
33
votes
4answers
57k 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 ...
124
95
votes
7answers
105k 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 ...
118
votes
19answers
86k views

How can I run a server on Linux on port 80 as a normal user?

I have googled about it for quite some time, but couldn't find it. I am on Ubuntu Linux and want to run a server on port 80, but due to security mechanism of Ubuntu, I get the following error: ...
159
99
votes
4answers
74k views

What permissions should my website files/folders have on a Linux webserver?

This is a Canonical Question about File Permissions on a Linux web server. I have a Linux web server running Apache2 that hosts several websites. Each website has its own folder in /var/www/. ...
45
votes
5answers
89k 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
8answers
78k views

How to zip/unzip files in Powershell?

Is there a one-liner that will zip/unzip files (*.zip) in PowerShell?
92
votes
2answers
39k 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 ...
28
votes
2answers
84k 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 ...
149
votes
3answers
97k 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 ...
49
votes
12answers
115k 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 ...
31
votes
3answers
70k 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?
48
votes
10answers
130k 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 ...
65
votes
4answers
66k 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?
60
votes
10answers
91k 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 ...
23
votes
8answers
69k 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! @ ...
110
17
votes
4answers
157k 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?
67
votes
4answers
70k 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 ...
21
votes
5answers
163k 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 ...
17
votes
3answers
40k views

Debian 5.0 (lenny) apt sources fail?

For the past few days, I couldn't update our apt-sources on Debian 5.0 (lenny). I get the following errors. W: Failed to fetch http://ftp.debian.org/debian/dists/lenny/main/binary-amd64/Packages 404 ...
19
votes
12answers
91k 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.
8
votes
7answers
105k 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 ...
55
votes
3answers
49k 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 ...
52
votes
7answers
69k 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. ...
27
votes
6answers
53k 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?
128
13
votes
10answers
137k 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 ...
21
votes
7answers
107k 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?
66
votes
6answers
132k views

Boot and Install Windows from a USB thumb drive

Installing Windows from a thumb drive is vastly superior to burning a copy to a DVD which will fill some landfill somewhere with toxic stuff. Not to mention it's about 50x faster to install Windows ...
43
votes
8answers
147k 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<??@@ ...
33
votes
10answers
24k 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 ...
134
votes
6answers
109k 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 ...
14
votes
9answers
111k views

Disable TeamViewer from “stealing” Port 80?

How can you disable TeamViewer from using/reserving port 80? I am certain in the previous version <v4.1.6 there used to be a radio button option in "options" which disabled it from needing it, but ...
5
votes
1answer
19k 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 ...
78
votes
15answers
86k 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 ...
29
votes
7answers
56k 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. ...
5
votes
3answers
29k views

How to set the Internet Explorer Home Page via GPO?

I need to set the default home page for the entire domain via GPO. Where is the IE Home Page Policy located?
70
votes
9answers
93k 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)?
62
votes
9answers
57k views

Shell command to monitor changes in a file - What's it called again?

I know there was a command on Unix that I could use to monitor a file and see changes that are getting written to it. This was quite useful especially for checking log files. Do you know what it is ...
45
votes
6answers
83k 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 it's name. If I could see a list, it would probably jog my memory. ...
61
votes
9answers
71k views

When does `cron.daily` run?

When do entries in cron.daily (and .weekly and .hourly) run, and is it configurable? I haven't found a definitive answer to this, and am hoping there is one. I'm running RHEL5 and CentOS 4, but for ...
254
votes
5answers
56k 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 ...
24
votes
9answers
69k views

create home directories after create users

I created some users with: $ useradd john and I forgot to specify the parameter -m to create the home directory and to have the skeleton files copied to each user. now I want to do that, and I ...
50
votes
2answers
34k 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 ...
55
votes
3answers
69k views

Is there a way to view the members of an Active Directory group if you aren't a domain admin and can't log into to a domain controller?

Is there a way to view the members of an Active Directory group if you aren't a domain admin and can't log into to a domain controller?
44
votes
14answers
109k views

What is the correct temperature for a server room?

When I was working in our server room, I noticed that it was very cold. I know that the server room has to be cold to offset the heat of the servers, but perhaps it is TOO cold. What is an ...
40
votes
4answers
115k views

How can I port forward with iptables?

I want connections coming in on ppp0 on port 8001 to route to 192.168.1.200 on eth0 on port 8080 I've got these two rules -A PREROUTING -p tcp -m tcp --dport 8001 -j DNAT --to-destination ...
46
votes
10answers
14k views

How to [politely?] tell software vendor they don't know what they're talking about

Not a technical question, but a valid one nonetheless. Scenario: HP ProLiant DL380 Gen 8 with 2 x 8-core Xeon E5-2667 CPUs and 256GB RAM running ESXi 5.5. Eight VMs for a given vendor's system. ...
25
votes
2answers
55k views

DNS - NSLOOKUP what is the meaning of the non-authorative answer?

When I do a NS Lookup, for some domains I get the reply saying Non-authorative answer:. I want to know what it means? Got answer: HEADER: opcode = QUERY, id = 3, rcode = NXDOMAIN ...