Amazon Linux: apt-get: command not found

If you’re using Amazon Linux it’s CentOS-based, which is RedHat-based. RH-based installs use yum not apt-get. Something like yum search httpd should show you the available Apache packages – you likely want yum install httpd24. Note: Amazon Linux 2 has diverged from CentOS since the writing of this answer, but still uses yum.

What’s a .sh file?

If you open your second link in a browser you’ll see the source code: […] So it’s a bash script. Got Linux? In any case, the script is nothing but a series of HTTP retrievals. Both wget and curl are available for most operating systems and almost all language have HTTP libraries so it’s fairly … Read more

Confused about stdin, stdout and stderr?

Standard input – this is the file handle that your process reads to get information from you. Standard output – your process writes conventional output to this file handle. Standard error – your process writes diagnostic output to this file handle. That’s about as dumbed-down as I can make it 🙂 Of course, that’s mostly by convention. There’s nothing stopping … Read more

PowerShell says “execution of scripts is disabled on this system.”

If you’re using Windows Server 2008 R2 then there is an x64 and x86 version of PowerShell both of which have to have their execution policies set. Did you set the execution policy on both hosts? As an Administrator, you can set the execution policy by typing this into your PowerShell window: For more information, see Using the Set-ExecutionPolicy Cmdlet. When you are … Read more

PowerShell says “execution of scripts is disabled on this system.”

If you’re using Windows Server 2008 R2 then there is an x64 and x86 version of PowerShell both of which have to have their execution policies set. Did you set the execution policy on both hosts? As an Administrator, you can set the execution policy by typing this into your PowerShell window: For more information, see Using the Set-ExecutionPolicy Cmdlet. When you are … Read more

how to get program files x86 env variable?

On a 64-bit machine running in 64-bit mode: echo %programfiles% ==> C:\Program Files echo %programfiles(x86)% ==> C:\Program Files (x86) On a 64-bit machine running in 32-bit (WOW64) mode: echo %programfiles% ==> C:\Program Files (x86) echo %programfiles(x86)% ==> C:\Program Files (x86) On a 32-bit machine running in 32-bit mode: echo %programfiles% ==> C:\Program Files echo %programfiles(x86)% … Read more

Using %PROGRAMFILES(x86)% on Windows OS 32bit

According to this the environment variable %PROGRAMFILES(x86)% is only available on 64-bit systems. However, if you are on a 64-bit system and use %PROGRAMFILES%, the result you get depend on whether the process requesting the environment variable is 32-bit or 64-bit. So from a 64-bit process on a 64-bit system you would get C:\Program Files, … Read more