Tie-in to Win 10 x64's WSL Windows Subsystem for Linux

Oct 18, 2009
289
12
From HowToGeek.com re the October 2018 Windows 10 update:

Notepad Supports Linux and Mac Line Endings




Notepad finally supports UNIX-style end of line (EOL) characters. Specifically, Notepad now supports UNIX/Linux line endings (LF) and Mac line endings (CR.) This means you can take a text file created on Linux or Mac and open it in Notepad—and it will actually look like it’s supposed to! Previously, the file would look all jumbled up, instead.

You can even edit the file in Notepad and save it, and Notepad will automatically use the appropriate line endings the file originally had. Notepad will still create files with the Windows line ending (CRLF) by default. The status bar shows which type of line endings are used for the current file if you enable it by clicking View>Status Bar.


Copy and Paste Keyboard Shortcuts for Bash




The Windows Subsystem for Linux runs Bash and other command-line Linux shell environments based on Linux distributions like Ubuntu, Fedora, openSUSE, and Debian on Windows. If you use Bash on Windows, you’re getting a feature many people have been asking for: keyboard shortcuts for copy and paste.

You can now right-click a console window’s title bar and select “Properties” to find an option that enables Ctrl+Shift+C and Ctrl+Shift+V for copy and paste. These keyboard shortcuts are disabled by default for compatibility reasons.

These keyboard shortcuts are available in all console environments, but they’re particularly useful in Linux-based shell environments where the Ctrl+C and Ctrl+V shortcuts are mapped to other functions and don’t function like copy and paste.

Launch a Linux Shell From File Explorer




You can now directly launch a Linux shell in a specific folder from File Explorer. To do so, hold down the Shift key, and then right-click a folder inside File Explorer. You’ll see an “Open Linux shell here” option next to the standard “Open PowerShell window here” option.
 
Oct 18, 2009
289
12
I just noticed this above and think it's worth emphasizing--nothing Linux-specific:

In Win 10 ver 1809 (Oct 2018 update): You can now right-click a console window’s title bar and select “Properties” to find an option that enables Ctrl+Shift+C and Ctrl+Shift+V for copy and paste. These keyboard shortcuts are disabled by default for compatibility reasons.

These keyboard shortcuts are available in all console environments.

============
Unrelated to that, the following keyboard shortcuts were deprecated long ago but usually still work.

copy: Ctrl+Insert
cut: Shift+Delete
paste: Shift+Insert


They can be a huge help when a program disables ctrl-c, ctrl-v and ctrl-x, because many folks don't know they still exist, so they don't disable them.
 
Oct 18, 2009
289
12
TCMD - Linux Interoperability Edition might be a better title, since that's how Microsoft describes it and "interoperability" describes the intended functionality a lot better than "access".
 
Oct 18, 2009
289
12
Mind quoting your "deprecation" source?
Why? It doesn't matter. I found it somewhere when I googled because I didn't remember the full set.

The point is that it still works and a lot of people don't know about those--I ran across those accidentally years ago.
 
Oct 18, 2009
289
12
TCMD - Linux Interoperability Edition might be a better title, since that's how Microsoft describes it and "interoperability" describes the intended functionality a lot better than "access".
Oooh - a backronym!
I had never heard of "backronyms".

Considering that the abbreviation would be TCMD-LIE probably a better name would be TCMD - Linux Interoperability Version.
 
Oct 18, 2009
289
12
It probably would be best to have an "alternative licensing" setup. If one license type is used the Linux capabilities aren't active. If you use a different license type it activates the full capabilities.

That would avoid needing two versions and having to reinstall if the user wants to add the Linux capabilities--just change the license. (For an additional charge, probably around $20.)
 
May 20, 2008
9,708
67
Syracuse, NY, USA
I wish MS would make the interop a lot faster. I use Unix text utilities a lot and while it's nice to have top-quality versions of all of them available via WSL, using them is very slow. Here's a comparison of a (very simple) plugin GREPP, Gnu GREP.EXE (Win32), TPIPE's grep, and WSL grep.

Code:
v:\> timer /q & grepp olset w32tmparams.btm & timer
set key=hklm\system\currentcontrolset\services\w32time\w32tmparams
Timer 1 off: 12:56:52  Elapsed: 0:00:00.02

v:\> timer /q & G:\gnu\grep.exe olset w32tmparams.btm & timer
set key=hklm\system\currentcontrolset\services\w32time\w32tmparams
Timer 1 off: 12:56:54  Elapsed: 0:00:00.16

v:\> timer /q & tpipe /input=w32tmparams.btm /grep=3,0,0,0,0,0,0,0,olset & timer
set key=hklm\system\currentcontrolset\services\w32time\w32tmparams
Timer 1 off: 12:56:56  Elapsed: 0:00:00.36

v:\> timer /q & wsl grep olset w32tmparams.btm & timer
set key=hklm\system\currentcontrolset\services\w32time\w32tmparams
Timer 1 off: 12:56:58  Elapsed: 0:00:00.61
I'd like to time it in a Linux shell. Does Ubuntu have any utility that will let me time the duration of a command?
 
Oct 18, 2009
289
12
I'm sure it does. As I said earlier in the thread, although I have Ubuntu set up I don't really use it. I primarily use Linux Mint (based on Ubuntu, which is based on Debian) but in GUI mode. The core functionalities are the same in the various versions.

Also keep in mind that all the WSL stuff is still in beta. That's one reason why it doesn't officially support GUI yet.

What happened is that MS partnered with Canonical (makers of Ubuntu) and once that got going the two Linux heavyweights, Red Hat and Novell (Suse), started jumping in because "we can't be left out."

Also, now that MS is a member of the Linux Foundation, they have a lot more input into the development of the Linux kernel, which should help improve WSL.

I suggest you post on the Ubuntu forum: The leading operating system for PCs, IoT devices, servers and the cloud | Ubuntu

www . ubuntu . com
 
May 20, 2008
9,708
67
Syracuse, NY, USA
Yup, it's called "time" ... built-in to tcsh with a more elaborate one in /usr/bin

That's pretty good. Below, the third observation (0:00:04) is the duration of the command.

Code:
/mnt/c/Apps/workplace> time grep olset /mnt/c/Apps/workplace/w32tmparams.btm
set key=hklm\system\currentcontrolset\services\w32time\w32tmparams
0.000u 0.000s 0:00.04 0.0%      0+0k 0+0io 0pf+0w
 
Oct 18, 2009
289
12
Not directly on point, but I saw it was announced a few days ago that IBM has agreed to buy Red Hat for $34 billion.

Red Hat is the largest commercial Linux supplier, and IBM is buying them mainly because Red Hat is a large cloud services provider.