EPH

PowerShell on LINUX?





I know it’s not Christmas yet, but I did get a nice early gift.
My main laptop has been very reliable over the last few years.
My old Lenovo ThinkPad (11e) has been great, but lately I’ve been thinking I’d like to upgrade. I’ve been looking for something to replace the 11e, and finally (after much consideration and spec comparison) settled on a newer 11e with twice the memory and a i3. It looks and feels as rugged as the old machine, but it’s a little faster. The unit came with Windows 10 pro which I replaced with Ubuntu 18.10.
I did play with it for a while with Windows, but after waiting for updates I decided I should stop fooling around and set it up the way I want.

I did test a few other Linux LTS Distros, but Ubuntu 18.10 works great on the new 11e – actually better than it did on the old ThinkPad. I think that was more related to the old Bios and driver/hardware limitations.
The one thing that I do like about Windows 10 has been PowerShell. Now that PowerShell is available for Ubuntu I might not need a Windows machine. I was never too excited about running Ubuntu under Windows, as a virtual box, or duel-boot.
I’ll probably load Win10 on the old 11e just to have on hand for special projects, but I’d like to keep the new laptop as a Linux only machine.

I know ToughBooks have been the benchmark for rugged laptops for fieldwork, but I’ve had great luck with the 11e (Education series) I paired solid hardware (ThinkPad) with a great Operating System (Ubuntu/Linux).
PowerShell is working – although not exactly the same as it would on Windows, but it does seem very promising.

PS /home/eph> Test-Connection LocalHost > Test_Connection.txt
Reply from 127.0.0.1: bytes=0 time=0ms TTL= Reply from 127.0.0.1: bytes=0 time=0ms TTL= Reply from 127.0.0.1: bytes=0 time=0ms TTL= Reply from 127.0.0.1: bytes=0 time=0ms TTL= Ping complete. 

Source Destination Replies


X LocalHost {System.Net.NetworkInformation.PingReply, System.Net.NetworkInformation.PingReply, System.Net.NetworkInformation.PingRep…

PS /home/eph> cat Test_Connection.txt

Source Destination Replies


X LocalHost {System.Net.NetworkInformation.PingReply, System.Net.NetworkInformation.PingReply, System.Net.NetworkInformation.PingRep…

PS /home/eph> ping localhost -c 6 > Ping_test.txt
PS /home/eph> Get-Content Ping_test.txt
PING localhost (127.0.0.1) 56(84) bytes of data.
64 bytes from localhost (127.0.0.1): icmp_seq=1 ttl=64 time=0.017 ms
64 bytes from localhost (127.0.0.1): icmp_seq=2 ttl=64 time=0.072 ms
64 bytes from localhost (127.0.0.1): icmp_seq=3 ttl=64 time=0.072 ms
64 bytes from localhost (127.0.0.1): icmp_seq=4 ttl=64 time=0.072 ms
64 bytes from localhost (127.0.0.1): icmp_seq=5 ttl=64 time=0.071 ms
64 bytes from localhost (127.0.0.1): icmp_seq=6 ttl=64 time=0.074 ms

— localhost ping statistics —
6 packets transmitted, 6 received, 0% packet loss, time 127ms
rtt min/avg/max/mdev = 0.017/0.063/0.074/0.020 ms
PS /home/eph> cat Ping_test.txt
PING localhost (127.0.0.1) 56(84) bytes of data.
64 bytes from localhost (127.0.0.1): icmp_seq=1 ttl=64 time=0.017 ms
64 bytes from localhost (127.0.0.1): icmp_seq=2 ttl=64 time=0.072 ms
64 bytes from localhost (127.0.0.1): icmp_seq=3 ttl=64 time=0.072 ms
64 bytes from localhost (127.0.0.1): icmp_seq=4 ttl=64 time=0.072 ms
64 bytes from localhost (127.0.0.1): icmp_seq=5 ttl=64 time=0.071 ms
64 bytes from localhost (127.0.0.1): icmp_seq=6 ttl=64 time=0.074 ms

— localhost ping statistics —
6 packets transmitted, 6 received, 0% packet loss, time 127ms
rtt min/avg/max/mdev = 0.017/0.063/0.074/0.020 ms

One nice attribute you have avaiable when using Powershell in Linux is the availability of standard Linux commands in the same terminal.

If PowerShell is the only thing keeping you tied to Windows, you might want to take a look at the Linux version.

Chocolatey Goodness

One of the reasons I prefer Linux over Windows is the ease of package management.
Apt, Yum, and Pacman depending on your distribution (Debian:Ubuntu, RedHat/Fedora or Arch) just seem much more logical than the Microsoft App Store or even Apple’s software store.

I don’t use the GUI interfaces available on any system if I can carry out the same goal from a terminal. I realize all these systems have a “terminal/Command line” available, but a lot of users have grown accustomed to a graphical point and click method. I haven’t, nor do I enjoy navigating around the screens pointing and clicking – it seems like a waste of time.

This is the section that was cutoff


PowerShell on the Windows System is an exception. I’ve gotten used to using the Windows command prompt and netshell when possible, but always felt that neither lived up to the power of BASH. PowerShell has grown and developed into a useful tool that many Linux users would find worthwhile for system administration and troubleshooting functionality.
When you add in the Chocolatey package management tool/repository you start to see potential for a more Linux-like work flow.

I see that there is also a GUI available for Chocolatey for any who prefer, but installing packages via PowerShell is fairly simple – as is searching and listing available packages.

I doubt i’ll abandon my Linux machine just to run PowerShell, but I think it’s beneficial to know how different Operating systems function and carry out similar tasks you might deal with in Linux.

“list, search, info, and install” are the commands I use the most when using Chocolatey.  The “info” command is extremely useful in providing information on the application you may consider installing.

choco -h 

  • list – lists remote or local packages
  • search – searches remote or local packages (alias for list)
  • info – retrieves package information. Shorthand for choco search pkgname –exact –verbose
  • install – installs packages from various sources
  • pin – suppress upgrades for a package
  • outdated – retrieves packages that are outdated. Similar to upgrade all –noop
  • upgrade – upgrades packages from various sources
  • uninstall – uninstalls a package
  • pack – packages up a nuspec to a compiled nupkg
  • push – pushes a compiled nupkg
  • new – generates files necessary for a chocolatey package from a template
  • sources – view and configure default sources (alias for source)
  • source – view and configure default sources
  • config – Retrieve and configure config file settings
  • features – view and configure choco features (alias for feature)
  • feature – view and configure choco features
  • setapikey – retrieves or saves an apikey for a particular source (alias for apikey)
  • apikey – retrieves or saves an apikey for a particular source
  • unpackself – have chocolatey set itself up
  • version – [DEPRECATED] will be removed in v1 – use choco outdated or cup <pkg|all> -whatif instead
  • update – [DEPRECATED] RESERVED for future use (you are looking for upgrade, these are not the droids you are looking for)
Installing Putty with Choco first removed an incomplete install attempt before adding -y

Check out chocolatey.org for more information including more details on security and the community package repository

Installing TCPview – a package from “Windows Sysinternals”

 

For those who would rather not use the Powershell command line, there is a GUI:

choco install chocolateygui –f -y

Oh, the calamity

Oh, the calamity of it all!
IBM taking over Red Hat, Apple increasing product costs, and Windows 10 version 18.09 “October pause” stressing you out as we approach the Holiday? Does the thought of installing Debian just in case Ubuntu announces some even more “fantastic” shift given you a slight feeling of nausea?Never fear, everything will be alright. Wait long enough and the sea will settle down eventually. The one announcement I had hoped to hear (an updated iPad mini 5) hasn’t materialized, or maybe I missed it in the fine print.So if all seems a little chaotic lately it’s probably amplified somewhat by the approach of the Holidays followed by the end of the year just around the corner.
It may seem like it’s been a strange year for Windows 10 updates, and a tad boring year for Linux desktops , but sometimes boring is appreciated. Too much excitement might persuade me to invest in a new computer even though I seem to remember something about Intel and AMD cpu specs. I’m sure it was something important, maybe having something to do with their architecture? Whatever it was, I’m sure it will come back to me.
We still see somewhat expensive laptops on the market with older hard drive technology (no SSD) and lower than stellar cpu speeds. I would have expected older builds like those at much lower prices, but apparently somebody is willing to purchase these machines.
I think I’ve squeezed as much use out of my old laptop as I possibly can. Do I pick up a mediocre consumer grade pc to get me through a few more years, keep waiting for the perfect price/power ratio deal, or bite the bullet and invest in a top of the line laptop currently available this shopping season?
If I only used OSX it would be an easy decision. The new MacBook Pro would be a logical upgrade from my 5+ yr old MacBook Pro. I don’t use it that much because the bulk of my time is spent working with Linux and Windows, so something like the Carbon X1 would be a more logical choice.
My experiment using a Chromebook actually has me rethinking which Laptop I take on the road. I found that a basic IdeaPad running Mint with the Chrome browser gives me the ability to still run Linux tools and have a similar experience as the Chromebook provides. This is not a bad trade off most of the time, but once in a while it would be nice to have a little more horsepower.
The Chromebook does startup much faster, and does seam more focused for writing – if that is what you’re mostly interested in. It would be great if it could run some of my favorite Linux tools, but I’m not seeing that yet. The Linux beta abilities that might be available for some Chromebooks in the future could open up some possibilities that might make my upgrade decision even more difficult.
I must admit that the Samsung Chromebook has a better keyboard feel than the minimalist Lenovo Ideapad, so I do think I could lean more towards the Chromebook if I find the need for Linux tools decreases in the future. On the other hand the I’ve had good luck with the Ideapad, and the keyboard isn’t too much of a distraction yet. If you’re doing a lot of writing neither one might be your preferred tool of choice.

Cold Grey Sky

It seems to rain or threaten to rain almost everyday lately.
The nights are windy and the early morning hours much colder than only a few weeks ago. Snow is in the air, not heavy yet, but soon the storms will arrive. I keep checking the latest laptop sales, because I think I should be able to find some decent deals as we head into the holiday season. There are some sales, but nothing I would call too good to pass up. There’s a difference between what I need, and what I’d like.

I know I don’t really need a new laptop, but I wouldn’t mind upgrading if I thought it would have a positive impact on my work flow. In fact I’m questioning my need for any type of laptop since I seem to use my phone for almost everything I do. Phones seem to have slid into the $1000.00 price neighborhood. Powerful laptops haven’t come down much unless you sacrifice speed and memory. I’ve been using my new Chromebook, which is useful for most of my day to day computing needs.
I still use Windows and Linux for “dedicated application ” related functions, but continue to pursue better alternatives.
My Chromebook won’t support the new Linux Beta functions, but there are some that apparently do. Maybe I should look at a more powerful Chromebook to go on sale.
I’ll be keeping my eye on the latest iPad developments that should be unveiled soon. That could present a better alternative to a new laptop, but I still would like to have a more powerful Linux machine. Granted the iPads are amazing, and less expensive than the MacBook Pro, but it really depends on what you want to get out of it.
I’m sure there will be more sales between now and the end of the year, but I may just continue making the most out of what i already have. I do get a lot out of older laptops mostly thanks to lite weight Linux distributions from Ubuntu and Arch derivatives.

My iPhone continues to morph into my primary computer, and I see many other users are apparently in the same boat.
It’s usually with me or close by most of the time, and it’s very fast.
The phone has already become my main source of current information “news”.
I prefer the “on demand” approach to retrieving information as opposed to flipping channels on the television or radio to find out what’s happening in the world.

Getting back to my “laptop upgrade” challenge, I think I will continue to look for some good sales with my Amazon App on my phone. Does anyone even advertise computer sales on television anymore? I should probably check. I think they used to.
I could venture out into the cold rainy night and check out any stores that still carry a decent selection of computers, but then again – I could just stay home check out some computer websites on my Chromebook. It’s great for that type of job. It’ll be snowing soon, probably best to stay in tonight, tomorrow night, probably until Spring.

Howling In The Night

October ends on Halloween night. Spooky, cold windy nights relinquished to thoughts of witches, ghosts, and monsters. There’s nothing to fear, or so we are told. Are the ancient incantations of old simply a cloudy evolution on our current computer coding? The programs and configurations that run our modern world misunderstood by many who rely on this magic everyday. The disembodied voices from beyond time and space now traveling the world on multiple high speed networks. Of course we have new monsters to loath superimposed against vague shadows cast by massive assemblies of robots spawned by artificial intelligence run amuck. Oooh Scary stuff!

Presumably very little has truly changed over the years beyond the current presentation. Writing code has morphed into the new wizardry which often baffles all who neglect to fully comprehend the full potential augmenting our perceived world. Anything poorly understood or under appreciated is often looked upon as awe inspiring and mysterious.  Programmers assume the role of Alchemists, who pursue processes which convert something of limited value and commonality into gold.

Electricity and ingenuity is the true power behind all this magic. Water, fire, and light, the power behind the electricity. We can trace many of these wonders back to one of the greatest magicians of all time: Tesla. (Alternating current)

Where there is mystery, rumors of good and evil forces take root. On some levels we have too much reliance on things we fail to fully comprehend.

Magic and wonder are all around us if we look deep enough. The lightning that flashes in the sky, and the thunder that shakes the ground….will still make you look up.

It’s the mystery of darkness, not knowing what’s lurking in the night. The creaks and groans from the unseen, the flashes of blue light blinking endlessly in the night.

Then there is the dread that washes over with a shiver as you finally realize all your files were deleted by your latest OS updates…….

……….And they never returned…….ooooooooh haaaa haaaa

Happy Halloween!

%d bloggers like this: