I just downloaded the Sqlite3 command line shell for windows (http://www.sqlite.org/download.html). However when I try to run the executable in Cygwin it does not load and just hangs.
The Sqlite3 shell itself works as if I browse to it in Windows explorer it runs or if I open it in cmd it runs. How do I get it to work with Cygwin?
Cygwin currently doesn't work well with interactive native programs. It has to do with the way the Cygwin terminal code works, in order to provide expected POSIX semantics to Cygwin programs.
Therefore, your best bet is to use Cygwin's own SQLite package.
If you absolutely must use the native sqlite3.exe, you'll have use cmd.exe to run sqlite3.
Related
Is there a way to update/edit pycharm interpreters without the gui? IE editing some configuration file or something?
I am running pycharm community version 2018.2 in unix environment
The pycharm interpreter uses a defined python installation on the machine, either python or anaconda or something. I believe you can update the python via running it from it's installation location and piping or whatever you need from there.
I'm using wsl with zsh as my default shell. however, in windows Rstudio I only have access to PowerShell, CMD, and bash in the terminal settings. How can I add zsh to these options? I know that it is possible to use custom shells as terminal in Mac and Linux Rstudio but I'd like to have the same feature in windows rstudio.
You can define any preferred default shell for your WSL environment have a look here on a valid method - https://medium.com/#vinhp/set-and-use-zsh-as-default-shell-in-wsl-on-windows-10-the-right-way-4f30ed9592dc and after that, if you have WSL (properly) installed, you should be able to select Bash (WSL) as your default Terminal.
After having done some testing ie trying all sorts of workarounds on the zsh of my WSL2 I have come to the conclusion that based on this: https://support.rstudio.com/hc/en-us/articles/115010737148-Using-the-RStudio-Terminal?version=1.2.5033&mode=desktop#lifetime
[x] Custom shell via path to executable ==> is NOT available for Windows IDE (written at the beginning of Appendix A)
Judging by that - on WIN RStudio Desktop 1.2.5033 - imho you can only start it via issuing zsh as the first command in your WSL bash terminal.
I have exhaustively tried to get the program to compile properly on Windows, but it has been a futile struggle. However, Linux seems to handle it just fine. Using Ubuntu on WSL and running make, I get an executable which I can run in bash with ./. I would like to use this and call it in R, though I am not sure if this is possible. I can do this using a Windows executable by doing system(), however, this does not seem to translate to a Linux executable. Is there a proper way to call a Linux executable inside an R script?
To run a Linux binary in WSL from the Windows environment, use the wsl commandline utility. In R, that would look like
system2("wsl", "your_binary --arg1 --arg2 ...")
On Windows, default terminal for Atom's Platformio-Ide-Terminal is Powershell (at least, that is what I get without any configuration).
I would prefer a terminal using unix-type commands. I already have MINGW and CYGWIN installed.
How can I avoid opening a Powershell and opening another terminal type instead?
Set the default shell in:
Edit>>Settings>>Packages>>Platformio Ide Terminal>>Settings>>Shell Override
You can use the git's bash as proposed here as you probably already have git installed.
C:\Program Files\Git\bin\bash.exe
Step by Step Solution
Go the Setting-> Packages -> In Search Bar, search for the platformio.
Open platformio and go to Shell Override Option.
Put the following line as per as your Terminal Requirement
For cmd- C:\\WINDOWS\\System32\\cmd.exe
For Power Shell- C:\\WINDOWS\\Sysnative\\WndowsPowerShell\\v1.0\\powershell.exe
For bash- C:\\Program Files\\Git\\bin\\bash.exe or C:\\Windows\\System32\\bash.exe (depending on how you install the bash). Be Sure, that you have already install the bash into your computer.
Now, you can integrate bash, cmd, git bash, Power Shell into Atom using platformio as terminal.
For CYGWIN users, the bash executable from the following location has proved useful for setting the shell override Settings >> Packages >> Platformio Ide Terminal >> Settings >> Shell Override
C:\cygwin64\bin\bash.exe
If you are now using Ubuntu for Windows 10 (downloaded from the app store), you can change it to that as well.
Ubuntu gets installed in Windows' PATH by default, so just change the default shell to:
ubuntu.exe
That's it. Just remember that to get to your code, cd to /mnt/(driveletter)/wherever/your/files/sit.
For someone who still can't get this to work because your git bash is installed in AppData. This worked for me.
C:\Users\saurabh\AppData\Local\Programs\Git\bin\bash.exe
How am i able to execute UNIX commands on my PC Command prompt? Note i do not have cygwin installed, although i was going to before i discovered this.
This is a development machine so i have a lot installed on it like ruby, python, git, github, node and so on.
What does this mean? can i use this without cygwin?
Here is a list of programs installed on my PC program list
How am I able to execute UNIX commands on my PC Command prompt?
You can use the where command in a cmd shell to find out the exact location of your Unix commands, for example:
where ls
This assumes, of course, that ls is located somewhere in your current PATH.
The location returned will show you in which directory your Unix commands are installed and may be enough for you to determine how they were installed.
The where command is roughly equivalent to the Unix which command.
By default, the search is done in the current directory and in the
PATH.
Syntax
WHERE [/r Dir] [/q] [/f] [/t] Pattern ...
WHERE [/q] [/f] [/t] [$ENV:Pattern
Source where
Further Reading
An A-Z Index of the Windows CMD command line - An excellent reference for all things Windows cmd line related.
where - Locate and display files in a directory tree.
Running Unix commands in windows can be done by having a tool like Cygwin which has those commands.
You can also get many of those commands compiled for windows and then run them using the command with the full path or only the command if the executable is in a path known by adding the paths to the executable files in Windows by :
1) Running in the terminal: PATH %PATH%;C:\<new_path>
2) Creating command aliases like: doskey np=C:\<new_path>\new_command.exe $*. $* is used to be able to transmit parameters