Hi all
If you try to do
apt install micro
You will be told that it was not found..
Does anyone know why it's not in the repository?
It's quite common in any other Linux distribution.
Thank you
Re: "micro" Editor on RPiOS Lite
Looks to be there to me,
Code: Select all
notpi@raspi14:~ $ apt -s install micro
NOTE: This is only a simulation!
apt needs root privileges for real execution.
Keep also in mind that locking is deactivated,
so don't depend on the relevance to the real current situation!
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Recommended packages:
xclip
The following NEW packages will be installed:
micro
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Inst micro (2.0.8-1 Raspbian:stable [armhf])
Conf micro (2.0.8-1 Raspbian:stable [armhf])
notpi@raspi14:~ $
Unreadable squiggle
Re: "micro" Editor on RPiOS Lite
Weird.
Might it have something to do with the fact that I'm on Buster instead of Bullseye?
Might it have something to do with the fact that I'm on Buster instead of Bullseye?
$ uname -a
Linux raspberrypi 5.10.103+ #1529 Tue Mar 8 12:19:18 GMT 2022 armv6l GNU/Linux
Re: "micro" Editor on RPiOS Lite
Yes. It wasn't available in Buster (Raspbian or Debian).
Unreadable squiggle
Re: "micro" Editor on RPiOS Lite
You can install it for (almost) any platform via the developer's website: Micro - Home
That typically installs it in the current folder, which isn't much use for global use. It's a good editor, but rather slow on a Raspberry Pi Zero
That typically installs it in the current folder, which isn't much use for global use. It's a good editor, but rather slow on a Raspberry Pi Zero
‘Remember the Golden Rule of Selling: “Do not resort to violence.”’ — McGlashan.
Pronouns: he/him
Pronouns: he/him
Re: "micro" Editor on RPiOS Lite
I see, thank you.
Really?
Is that slowness felt even when editing small bash script files?
Currently I'm using nano, and its shortcut keys are less intuitive and harder to remember than micro's..
Last edited by spaceman5 on Thu Mar 30, 2023 6:07 am, edited 1 time in total.
Re: "micro" Editor on RPiOS Lite
On a single core Raspberry Pi Zero, micro takes about 5 seconds to open a trivial bash script. I suspect what takes time is loading the highlighting system.
I really dislike nano, too. You might be able to live with the delay with micro. Alternatively, there's tilde, which tries very hard to look like the old MS-DOS text editor, and is a bit quicker than micro
I really dislike nano, too. You might be able to live with the delay with micro. Alternatively, there's tilde, which tries very hard to look like the old MS-DOS text editor, and is a bit quicker than micro
‘Remember the Golden Rule of Selling: “Do not resort to violence.”’ — McGlashan.
Pronouns: he/him
Pronouns: he/him
Re: "micro" Editor on RPiOS Lite
I discovered zile a while ago (was mentioned here). It's like a stripped-down emacs (lisp and all) but super-fast for doing quickie edits.
ESC-x describe-bindings shows a subset of the bazillion key bindings that emacs has.
I compared loading a 1300-line bash script in both micro and zile on a p02w. Zile was pretty much instantaneous. There was a noticeable lag with micro. Of course, flushed the buffer caches between each test. YMMV
ESC-x describe-bindings shows a subset of the bazillion key bindings that emacs has.
I compared loading a 1300-line bash script in both micro and zile on a p02w. Zile was pretty much instantaneous. There was a noticeable lag with micro. Of course, flushed the buffer caches between each test. YMMV
Pi tools:
Quickly and easily build customized exactly as-you-want SSDs/SD Cards: https://github.com/gitbls/sdm
Easily run and manage your network's DHCP/DNS servers on a Pi: https://github.com/gitbls/ndm
Easy and secure IPSEC/IKEV2 VPN installer/manager: https://github.com/gitbls/pistrong
Lightweight Virtual VNC Config: https://github.com/gitbls/RPiVNCHowTo
Quickly and easily build customized exactly as-you-want SSDs/SD Cards: https://github.com/gitbls/sdm
Easily run and manage your network's DHCP/DNS servers on a Pi: https://github.com/gitbls/ndm
Easy and secure IPSEC/IKEV2 VPN installer/manager: https://github.com/gitbls/pistrong
Lightweight Virtual VNC Config: https://github.com/gitbls/RPiVNCHowTo
Re: "micro" Editor on RPiOS Lite
Considering the much longer time than 5secs that it takes me to find how to do a simple operation in nano,
I'd take this 5sec delay in micro, which happens once, in the beginning..
Nano is simply a pain.
Looks simple and nice,
yet it has some problems..
1) It does not recognize arrow keys, to move inside the editor
(while every other program that I use, does recognize the arrow keys, without changing anything in PuTTY's settings)
2) It does not show Hidden Files by default, when choosing File->Open...
3) It does not auto syntax files that don't have an extension, like .bashrc for example,
and so you need to manually set the correct highlight for this file, every time you open it.
(other editors don't have this problem)
So while it's nice, with really familiar shortcut keys,
I think the best thing for me is to stay with micro.
You wrote earlier:
You mean If I install it using the single line written in its home page?scruss wrote: You can install it for (almost) any platform via the developer's website: Micro - Home
That typically installs it in the current folder, which isn't much use for global use.
Code: Select all
curl https://getmic.ro | bash
Code: Select all
cd /usr/bin/
curl https://getmic.ro | bash
BTW, the /usr/bin/ folder contains executables, not folders..
So it means that most programs that you install are a single file executable,
and not a folder with 1 executable and more supporting files?
Re: "micro" Editor on RPiOS Lite
You could manually install the Bullseye version on Buster. Generally it's not recommended to mix and match releases because of dependency conflicts, but this one appears safe enough.
The filename will be different for 32-bit (Raspbian) and 64-bit (Debian) and this has only been tested on Raspberry Pi OS Buster Lite.
These instructions currently work, but may not in future due to updates.
For 32-bit Raspberry Pi OS
Code: Select all
rpdom@raspberrypi32:~ $ wget -q http://raspbian.raspberrypi.org/raspbian/pool/main/m/micro/micro_2.0.8-1_armhf.deb
rpdom@raspberrypi32:~ $ sudo dpkg -i micro_2.0.8-1_armhf.deb
Selecting previously unselected package micro.
(Reading database ... 39435 files and directories currently installed.)
Preparing to unpack micro_2.0.8-1_armhf.deb ...
Unpacking micro (2.0.8-1) ...
Setting up micro (2.0.8-1) ...
Processing triggers for man-db (2.8.5-2) ...
rpdom@raspberrypi32:~ $ micro -version
Version: 2.0.8
Code: Select all
rpdom@raspberrypi64:~ $ wget -q http://deb.debian.org/debian/pool/main/m/micro/micro_2.0.8-1%2bb6_arm64.deb
rpdom@raspberrypi64:~ $ sudo dpkg -i micro_2.0.8-1+b6_arm64.deb
Selecting previously unselected package micro.
(Reading database ... 33238 files and directories currently installed.)
Preparing to unpack micro_2.0.8-1+b6_arm64.deb ...
Unpacking micro (2.0.8-1+b6) ...
Setting up micro (2.0.8-1+b6) ...
Processing triggers for man-db (2.8.5-2) ...
rpdom@raspberrypi64:~ $ micro -version
Version: 2.0.8
Unreadable squiggle
Re: "micro" Editor on RPiOS Lite
Thank you rpdom.
But why mess with installing the Bullseye version, and not use the vesion from the developer's website?
(with the proper location for installing, instead of simply the current folder)
Shouldn't that be easier, and less prone to problems in the future?
Re: "micro" Editor on RPiOS Lite
I'd rather have the package manager handle things instead of having an unmanaged package on my system, if possible. But in this particular case I'd seriously be looking to install Bullseye anyway.
Unreadable squiggle
Re: "micro" Editor on RPiOS Lite
micro is written in Go, so its whole package is one big static binary. Installing a deb seems hardly worth it
‘Remember the Golden Rule of Selling: “Do not resort to violence.”’ — McGlashan.
Pronouns: he/him
Pronouns: he/him
Re: "micro" Editor on RPiOS Lite
Here's what I did eventually..
A single file was created there,
like scruss said, this is a single file program.
Since /usr/local/bin is already in the PATH, then typing "micro" anywhere, loads it.
It came out simpler than I expected.
Some may say that this method of installing has a disadvantage that it does not auto-update itself,
but since the uninstallation process for this single file program is extremely simple (rm /usr/local/bin/micro),
then updating in the future should not be a problem to anyone.
Code: Select all
cd /usr/local/bin
curl https://getmic.ro | bash
like scruss said, this is a single file program.
Since /usr/local/bin is already in the PATH, then typing "micro" anywhere, loads it.
It came out simpler than I expected.
Some may say that this method of installing has a disadvantage that it does not auto-update itself,
but since the uninstallation process for this single file program is extremely simple (rm /usr/local/bin/micro),
then updating in the future should not be a problem to anyone.