Most Popular

1500 questions
538
votes
15 answers

How to enable execution of PowerShell scripts?

When I try to execute my PowerShell script I get this error: File C:\Common\Scripts\hello.ps1 cannot be loaded because the execution of scripts is disabled on this system. Please see "get-help about_signing" for more details. At line:1 char:13 …
530
votes
18 answers

How to clear the contents of a file from the command line?

I have a log file that has a bunch of stuff in it that I don't need anymore. I want to clear the contents. I know how to print the contents to the screen: cat file.log I know how to edit the file, line-by-line: nano file.log But I don't want to…
Andrew
  • 15,494
527
votes
16 answers

How to fix warning about ECDSA host key

I'm trying to setup password-less SSH on an Ubuntu server with ssh-copy-id myuser@myserver, but I'm getting the error: Warning: the ECDSA host key for 'myserver' differs from the key for the IP address '192.168.1.123' What's causing this, and how…
Cerin
  • 9,652
520
votes
12 answers

Create/rename a file/folder that begins with a dot in Windows?

Many programs needs folder names that starts with a dot, like .emacs.d, .gimp-2.2, .jedit etc. How do I create such a folder? When using the Windows Explorer in Windows 2000 (and other versions), I get an error message saying "You have to enter a…
Adventure10
519
votes
10 answers

Can I delete the folder C:\ProgramData\Package Cache\?

There is a new folder full of installers located at C:\ProgramData\Package Cache\. I believe this is from Visual Studio 2012 RC. Can I delete these gigabytes of data without consequences? Are they all temporary files? It's a beta product so I'm not…
Ben L
  • 5,560
519
votes
32 answers

How to check if a binary is 32- or 64-bit on Windows?

Is there an easy way to check if a binary is 32- or 64-bit on Windows? I need to check before I move the program to a 32-bit machine and experience a spectacular failure.
Septagram
  • 5,678
519
votes
11 answers

What is the home directory on Windows Subsystem for Linux?

When I start bash on Windows Subsystem for Linux, it drops me in the directory /mnt/c/Users/ When I ls this directory, I see the directories Desktop, Documents, etc. that I can see are in C:\Users\ using the Windows File…
bcf
  • 5,333
516
votes
19 answers

Is there any 'sudo' command for Windows?

I always work on a non-administrator account on my Windows computer. Sometimes I need to install programs which requires administrator access. As I mostly use the Windows command prompt, is there a Windows command to escalate privileges, similar to…
ukanth
  • 10,800
510
votes
16 answers

Test if a port on a remote system is reachable (without telnet)

In the old days, we used telnet to see if a port on a remote host was open: telnet hostname port would attempt to connect to any port on any host and give you access to the raw TCP stream. These days, the systems I work on do not have telnet…
Steve HHH
  • 7,430
509
votes
7 answers

How does a computer restart itself?

How can a computer restart itself? After it's off, how does it tell itself to come back on again? What kind of software is it that can do this?
507
votes
6 answers

How do I exit telnet?

I start telnet by telnet host port. How do I stop it in Windows? Shockingly, Ctrl+C doesn't work.
Val
  • 6,535
505
votes
9 answers

Did I just get hacked?

I am developing a consumer product, and it is supposed to be connected to the Internet, so as expected, it is connected to the Internet so that I can properly develop it. I went away for an hour or two, and when I came back to my office I noticed…
vaid
  • 3,569
502
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
  • 5,221
501
votes
2 answers

How do I rename a session in tmux?

When I first started using tmux, I didn't give my first session a name. Then, as I started creating different sessions for different tasks (work, play, etc), I started naming my sessions. Now I have a bunch of different sessions, but the first one…
Richard Jones
  • 5,928
  • 3
  • 20
  • 14
501
votes
21 answers

How can I make Chrome stop caching redirects?

I am working on a web application that is using redirects (for pretty URLs). I am trying to debug logic in the way the redirects are working. However Google Chrome keeps remembering the redirects and even after I change the code, redirecting the…
JD Isaacks
  • 8,674
  • 12
  • 42
  • 41