Unix & Linux Stack Exchange
Q&A for users of Linux, FreeBSD and other Unix-like operating systems
Latest Questions
16
votes
6
answers
1876
views
Finding all software packages in Debian that provide a particular alternative
The Debian distribution has the [Debian Alternatives System](https://wiki.debian.org/DebianAlternatives). From the Wiki: > The Debian alternatives system creates a way for several programs that > fulfill the same or similar functions to be listed as alternative > implementations that are installed s...
The Debian distribution has the [Debian Alternatives System](https://wiki.debian.org/DebianAlternatives) . From the Wiki:
> The Debian alternatives system creates a way for several programs that
> fulfill the same or similar functions to be listed as alternative
> implementations that are installed simultaneously but with one
> particular implementation designated as the default. For example many
> systems have several text editors installed at the same time. The vi
> program is a classic example of an editor that has many
> implementations such as nvi, elvis, vim, etc. but which one should be
> designated as the default?
In general, there are multiple packages in Debian that provide a particular alternative. How does one obtain a complete list of all such packages that exist in the Debian repositories? Let us use the vi alternative as an example.
NOTE: Doing such a query against the list of installed packages is easy, but that is not what this question asks.
Faheem Mitha
(36008 rep)
Sep 17, 2014, 04:04 PM
• Last activity: Apr 1, 2025, 11:15 PM
27
votes
4
answers
61330
views
Better way to add alternative using update-alternatives?
I've looked up the manual of `update-alternatives` several times but I can't find out how to show the current link pointing to a specific alternative, and that information is needed when adding a new alternative. From the `update-alternatives` manual: --install Let's say I want to add a new version...
I've looked up the manual of
update-alternatives
several times but I can't find out how to show the current link pointing to a specific alternative, and that information is needed when adding a new alternative.
From the update-alternatives
manual:
--install
Let's say I want to add a new version of Java Runtime Edition, but I don't know the current symlink that links to the alternative (`` parameter). What I currently do is:
sudo update-alternatives --install /tmp/randomStuff java /usr/local/java/jre1.7.0_25/bin/java 0
That command will output:
update-alternatives: renaming java link from /usr/local/bin/java to /tmp/randomStuff.
Reading the output I find out the old link that was pointing to the alternative, so I can finally run my command again with the right ` parameter, changing
/tmp/randomStuff to
/usr/local/bin/java`:
sudo update-alternatives --install /usr/local/bin/java java /usr/local/java/jre1.7.0_25/bin/java 0
That works fine, but as you see, running the command with /tmp/randomStuff
as the `` parameter is very awkward.
So, here comes the questions: (1) Are there any update-alternative
arguments that can output the current link that is pointing to a specific alternative, or (2) is there a way to install a new alternative without having to provide a new parameter, simply keeping the current ``?
pagliuca
(373 rep)
Jul 6, 2013, 03:24 PM
• Last activity: Mar 19, 2025, 05:14 PM
3
votes
2
answers
2107
views
PDF readers not based on poppler?
It seems that most GNU/Linux PDF readers use [poppler](https://poppler.freedesktop.org/) for rendering. For testing purposes I would like **not** to use poppler. Are there any (recent) alternatives ? `xpdf` doesn't count, since I expect both to share large pieces of code.
It seems that most GNU/Linux PDF readers use [poppler](https://poppler.freedesktop.org/) for rendering.
For testing purposes I would like **not** to use poppler. Are there any (recent) alternatives ?
xpdf
doesn't count, since I expect both to share large pieces of code.
Skippy le Grand Gourou
(3453 rep)
Oct 11, 2016, 02:32 PM
• Last activity: Mar 3, 2025, 12:37 PM
0
votes
1
answers
92
views
GNU assembler alternatives
I am trying to build my system from scratch, since I really like the idea of atomicity of each program in unix-like approach, I would like to preserve it as much as possible in my build. Since GNU binutils, in a way, violates this principle, I would like to know if there is just GNU assembler, which...
I am trying to build my system from scratch, since I really like the idea of atomicity of each program in unix-like approach, I would like to preserve it as much as possible in my build.
Since GNU binutils, in a way, violates this principle, I would like to know if there is just GNU assembler, which wouldn't be dependant on binutils?
If not, are there any minimal and performant alternatives to GNU assembler?
I know of yasm, but in case there is a better one, I would like to know of it.
Thank you in advance.
Даниил Носиков
(5 rep)
Jan 20, 2025, 08:08 AM
• Last activity: Jan 20, 2025, 06:20 PM
0
votes
1
answers
69
views
I deleted my /etc/alternatives/ by accident
I'm on ubuntu 22.04. I was there removing the files related to libcudnn. However, I thought i was CDing inside, but an enter later, I realized that I was on sudo rm -rfing there. So, I ended up deleting the entire folder. Now, I'm wondering if can I still work on ubuntu like nothing happened? Or sho...
I'm on ubuntu 22.04. I was there removing the files related to libcudnn. However, I thought i was CDing inside, but an enter later, I realized that I was on sudo rm -rfing there. So, I ended up deleting the entire folder. Now, I'm wondering if can I still work on ubuntu like nothing happened? Or should i reinstall it? How important are those alternative links?
And as an alternative solution, (no puns intended) can I just ignore it if i start working in virtual envs?
fandn
(1 rep)
Nov 7, 2024, 12:45 AM
• Last activity: Nov 7, 2024, 06:17 AM
13
votes
6
answers
8931
views
Choose which browser to open link in
I am using both Firefox and Google Chrome with multiple windows (profiles). When clicking a link in e.g. a terminal or another GUI app I'd like to choose which browser/window to load the URL in instead of running the default browser (e.g. Firefox). Does anyone know if such a program exists? From my...
I am using both Firefox and Google Chrome with multiple windows (profiles).
When clicking a link in e.g. a terminal or another GUI app I'd like to choose which browser/window to load the URL in instead of running the default browser (e.g. Firefox). Does anyone know if such a program exists?
From my (limited) understanding I think it should replace the default browser and show a popup with known browsers and/or active windows where the link should be delegated to.
If found [this answer](https://unix.stackexchange.com/questions/333967/auto-detect-already-open-browser-instead-of-opening-default-one) , but it is only looking for existing processes and starts a default one if none is found.
Melle
(241 rep)
Dec 10, 2018, 08:28 PM
• Last activity: May 20, 2024, 02:27 PM
2
votes
2
answers
5518
views
How to use alternatives on linux - CentOS 6?
I am trying to configure python to 3.9 on CentOS 6. Here is my steps: [root@quickstart ~]# alternatives --install /usr/bin/python python /usr/local/bin/python3.9 10 [root@quickstart ~]# alternatives --config python There is 1 program that provides 'python'. Selection Command ------------------------...
I am trying to configure python to 3.9 on CentOS 6.
Here is my steps:
[root@quickstart ~]# alternatives --install /usr/bin/python python /usr/local/bin/python3.9 10
[root@quickstart ~]# alternatives --config python
There is 1 program that provides 'python'.
Selection Command
-----------------------------------------------
*+ 1 /usr/local/bin/python3.9
Enter to keep the current selection[+], or type selection number: 1
[root@quickstart ~]# alternatives --display python
python - status is manual.
link currently points to /usr/local/bin/python3.9
/usr/local/bin/python3.9 - priority 10
Current `best' version is /usr/local/bin/python3.9.
[root@quickstart ~]# alternatives --set python /usr/local/bin/python3.9
But when I issue python --version, still is 2.6
[root@quickstart ~]# python --version
**Python 2.6.6**
[root@quickstart ~]#
EDIT: even following the steps, the $PATH still has the python 2.6 in the first argument. Could be it? where is the $PATH configured? neither /etc/bashrc or ~/.bashrc doesn't have it.
[root@quickstart ~]# whereis python
python: /usr/bin/python2.6 /usr/bin/python /usr/bin/python2.6-config /usr/lib/python2.6 /usr/lib64/python2.6 /usr/local/bin/python3.9-config /usr/local/bin/python3.9 /usr/local/lib/python3.9 /usr/include/python2.6 /usr/share/man/man1/python.1.gz
[root@quickstart ~]#
EDIT 2:
The /etc/alternatives has the python as 3.9, but not globaly.
[root@quickstart alternatives]# pwd
/etc/alternatives
[root@quickstart alternatives]# ./python --version
Python 3.9.10
[root@quickstart alternatives]# python --version
Python 2.6.6
[root@quickstart alternatives]#
Astora
(509 rep)
Feb 10, 2022, 11:19 AM
• Last activity: May 2, 2024, 07:01 AM
0
votes
2
answers
252
views
The alternatives command on FreeBSD (for choosing between versions of a package)
There's an `alternatives` command on Linux (man page section 1, `update-alternatives`), and there's a `select` subcommand on the `port` command from MacPorts. Is there an equivalent on FreeBSD? Or do I have to manually manage the symbolic links?
There's an
alternatives
command on Linux (man page section 1, update-alternatives
), and there's a select
subcommand on the port
command from MacPorts.
Is there an equivalent on FreeBSD? Or do I have to manually manage the symbolic links?
DannyNiu
(692 rep)
Aug 29, 2021, 11:30 AM
• Last activity: Mar 10, 2024, 07:34 AM
2
votes
1
answers
81
views
Can I make update-alternatives keep 2 commands in sync?
I have 2 commands that I switch between using `update-alternatives` on Debian. My problem is that each command also has an autocompleter command that has to be switched at the same time the command is switched. Is there some way I can keep the 2 commands managed in a single "alternative", so that wh...
I have 2 commands that I switch between using
update-alternatives
on Debian. My problem is that each command also has an autocompleter command that has to be switched at the same time the command is switched. Is there some way I can keep the 2 commands managed in a single "alternative", so that when I switch commands (using update-alternatives --set ...
) the autocompleter is switched as well?
Old Pro
(1326 rep)
Feb 22, 2024, 11:59 AM
• Last activity: Feb 23, 2024, 10:16 AM
3
votes
2
answers
16258
views
On RHEL8 how can I use `alternatives` to choose an already listed version as the used version
On a RHEL 8.3 system I have two python3 versions installed and they show up as the version when I list alterantives' versions: ``` $ alternatives --display python3 /usr/bin/python3.6 - priority 1000000 slave easy_install-3: /usr/bin/easy_install-3.6 slave pip-3: /usr/bin/pip-3.6 slave pip3: /usr/bin...
On a RHEL 8.3 system I have two python3 versions installed and they show up as the version when I list alterantives' versions:
$ alternatives --display python3
/usr/bin/python3.6 - priority 1000000
slave easy_install-3: /usr/bin/easy_install-3.6
slave pip-3: /usr/bin/pip-3.6
slave pip3: /usr/bin/pip3.6
slave pydoc-3: /usr/bin/pydoc3.6
slave pydoc3: /usr/bin/pydoc3.6
slave pyvenv-3: /usr/bin/pyvenv-3.6
slave python3-man: /usr/share/man/man1/python3.6.1.gz
/usr/bin/python3.9 - priority 3900
slave easy_install-3: /usr/bin/easy_install-3.9
slave pip-3: /usr/bin/pip-3.9
slave pip3: /usr/bin/pip3.9
slave pydoc-3: /usr/bin/pydoc3.9
slave pydoc3: /usr/bin/pydoc3.9
slave pyvenv-3: (null)
slave python3-man: /usr/share/man/man1/python3.9.1.gz
Current `best' version is /usr/bin/python3.6.
How can I use the alternatives
command to choose the already listed python3.9
as the used version? (I.e. system-wide I want to execute python3.9
when I type on the command line python3
).
*Note:* I understand I can add a _new_ version with alternatives --install
(and then make it the best one with a high priority), but how can I _choose_ an already listed version as the best (and used) one?
halloleo
(649 rep)
Dec 2, 2021, 12:35 AM
• Last activity: Nov 20, 2023, 03:39 PM
0
votes
0
answers
332
views
Why, in my Kali Linux, setting user-installed python3.9.5 to default python3 results in "permission denied: python3" or "python3: command not found"?
***BACKGROUND*** I am using a fresh installation of Kali Linux 2023.1, which has come with Python3.11.1. I need to install MobSF, which requires `python3` to correspond to version between python3.8 and python3.10. So I decided to install pyenv and then version `3.9.5` via `pyenv install -v 3.9.5`. T...
***BACKGROUND***
I am using a fresh installation of Kali Linux 2023.1, which has come with Python3.11.1. I need to install MobSF, which requires
python3
to correspond to version between python3.8 and python3.10.
So I decided to install pyenv and then version 3.9.5
via pyenv install -v 3.9.5
. Then I executed pyenv global 3.9.5
. Then I executed python3 --version
and I got permission denied
.
So I decided to use update-alternatives
to make this newly installed python3.9.5
as default. I executed the following command.
sudo update-alternatives --install /usr/bin/python3 python3 /home/user/.pyenv/versions/3.9.5/bin 1
Then I executed sudo update-alternatives --config python3
and it gave me
└─$ sudo update-alternatives --config python3
[sudo] password for user:
There are 2 choices for the alternative python3 (providing /usr/bin/python3).
Selection Path Priority Status
------------------------------------------------------------
* 0 /usr/bin/python3.11 1 auto mode
1 /home/user/.pyenv/versions/3.9.5/bin 1 manual mode
2 /usr/bin/python3.11 1 manual mode
Press to keep the current choice[*], or type selection number:
and I entered **1
**.
Now when I execute sudo update-alternatives --config python3
, I get
└─$ sudo update-alternatives --config python3
[sudo] password for user:
There are 2 choices for the alternative python3 (providing /usr/bin/python3).
Selection Path Priority Status
------------------------------------------------------------
0 /home/user/.pyenv/versions/3.9.5/bin 1 auto mode
* 1 /home/user/.pyenv/versions/3.9.5/bin 1 manual mode
2 /usr/bin/python3.11 1 manual mode
Press to keep the current choice[*], or type selection number:
______________________________
***QUESTION***
Now when I run python3 -V
, I get
┌──(user㉿kali)-[~]
└─$ python3 -V
zsh: permission denied: python3
┌──(user㉿kali)-[~]
└─$ sudo python3 -V
[sudo] password for user:
sudo: python3: command not found
Now I don't know what to do. Please can someone guide?
______________________
***DETAILS FROM COMMENTS***
**Comment:** *So, is there a file there? You told the system to use /home/user/.pyenv/versions/3.9.5/bin/python3, does that exist? Is it executable?*
Following is the situation of /home/user/.pyenv/versions/3.9.5/bin/:
┌──(user㉿kali)-[~/.pyenv/versions/3.9.5/bin]
└─$ ls -al
total 116
drwxrwxrwx 2 user user 4096 Apr 28 07:10 .
drwxrwxrwx 6 user user 4096 Apr 28 03:24 ..
lrwxrwxrwx 1 user user 8 Apr 28 03:24 2to3 -> 2to3-3.9
-rwxrwxrwx 1 user user 127 Apr 28 03:24 2to3-3.9
lrwxrwxrwx 1 user user 7 Apr 28 03:24 idle -> idle3.9
lrwxrwxrwx 1 user user 7 Apr 28 03:24 idle3 -> idle3.9
-rwxrwxrwx 1 user user 125 Apr 28 03:24 idle3.9
lrwxrwxrwx 1 user user 6 Apr 28 03:24 pip -> pip3.9
-rwxrwxrwx 1 user user 255 Apr 28 03:24 pip3
-rwxrwxrwx 1 user user 255 Apr 28 03:24 pip3.9
lrwxrwxrwx 1 user user 8 Apr 28 03:24 pydoc -> pydoc3.9
lrwxrwxrwx 1 user user 8 Apr 28 03:24 pydoc3 -> pydoc3.9
-rwxrwxrwx 1 user user 110 Apr 28 03:24 pydoc3.9
lrwxrwxrwx 1 user user 9 Apr 28 03:24 python -> python3.9
lrwxrwxrwx 1 root root 25 Mar 13 08:18 python3 -> /etc/alternatives/python3
-rwxrwxrwx 1 user user 17576 Apr 28 03:23 python3.9
-rwxrwxrwx 1 user user 3111 Apr 28 03:24 python3.9-config
-rwxrwxrwx 1 user user 65392 Apr 28 03:24 python3.9-gdb.py
lrwxrwxrwx 1 user user 16 Apr 28 03:24 python3-config -> python3.9-config
lrwxrwxrwx 1 user user 16 Apr 28 03:24 python-config -> python3.9-config
As we can see that python3
is a symlink which points to /etc/alternatives/python3
. SO the following screenshot shows the situation of /etc/alternatives/python3
┌──(user㉿kali)-[/etc/alternatives/python3]
└─$ ls -al
total 116
drwxrwxrwx 2 user user 4096 Apr 28 07:10 .
drwxrwxrwx 6 user user 4096 Apr 28 03:24 ..
lrwxrwxrwx 1 user user 8 Apr 28 03:24 2to3 -> 2to3-3.9
-rwxrwxrwx 1 user user 127 Apr 28 03:24 2to3-3.9
lrwxrwxrwx 1 user user 7 Apr 28 03:24 idle -> idle3.9
lrwxrwxrwx 1 user user 7 Apr 28 03:24 idle3 -> idle3.9
-rwxrwxrwx 1 user user 125 Apr 28 03:24 idle3.9
lrwxrwxrwx 1 user user 6 Apr 28 03:24 pip -> pip3.9
-rwxrwxrwx 1 user user 255 Apr 28 03:24 pip3
-rwxrwxrwx 1 user user 255 Apr 28 03:24 pip3.9
lrwxrwxrwx 1 user user 8 Apr 28 03:24 pydoc -> pydoc3.9
lrwxrwxrwx 1 user user 8 Apr 28 03:24 pydoc3 -> pydoc3.9
-rwxrwxrwx 1 user user 110 Apr 28 03:24 pydoc3.9
lrwxrwxrwx 1 user user 9 Apr 28 03:24 python -> python3.9
lrwxrwxrwx 1 root root 25 Mar 13 08:18 python3 -> /etc/alternatives/python3
-rwxrwxrwx 1 user user 17576 Apr 28 03:23 python3.9
-rwxrwxrwx 1 user user 3111 Apr 28 03:24 python3.9-config
-rwxrwxrwx 1 user user 65392 Apr 28 03:24 python3.9-gdb.py
lrwxrwxrwx 1 user user 16 Apr 28 03:24 python3-config -> python3.9-config
lrwxrwxrwx 1 user user 16 Apr 28 03:24 python-config -> python3.9-config
Shy
(649 rep)
Apr 28, 2023, 09:50 AM
• Last activity: Apr 28, 2023, 12:02 PM
-1
votes
1
answers
822
views
No update-alternatives in AlmaLinux 8 for PHP
I run the command ```update-alternatives --config php``` and nothing shows up. I checked for the binaries and they are executables in the ```/usr/bin``` folder. Installed PHP versions are 7.4 from the AppStream repository and PHP 5.6 from the REMI repository. ``` ll /usr/bin/php* -rwxr-xr-x. 1 root...
I run the command
-alternatives --config php
and nothing shows up. I checked for the binaries and they are executables in the /usr/bin
folder. Installed PHP versions are 7.4 from the AppStream repository and PHP 5.6 from the REMI repository.
ll /usr/bin/php*
-rwxr-xr-x. 1 root root 6376328 Oct 11 01:34 /usr/bin/php
lrwxrwxrwx 1 root root 32 Feb 15 21:31 /usr/bin/php56 -> /opt/remi/php56/root/usr/bin/php
lrwxrwxrwx 1 root root 36 Feb 15 21:31 /usr/bin/php56-cgi -> /opt/remi/php56/root/usr/bin/php-cgi
lrwxrwxrwx 1 root root 33 Aug 11 2021 /usr/bin/php56-pear -> /opt/remi/php56/root/usr/bin/pear
lrwxrwxrwx 1 root root 38 Feb 15 21:31 /usr/bin/php56-phar -> /opt/remi/php56/root/usr/bin/phar.phar
-rwxr-xr-x. 1 root root 6375784 Oct 11 01:34 /usr/bin/php-cgi
-rwxr-xr-x. 1 root root 4741 Oct 11 01:34 /usr/bin/phpize
With Java, I noticed they are symlinks to
.
[root@alma8-webapps-dev alternatives]# ll /usr/bin/java*
lrwxrwxrwx. 1 root root 22 Feb 10 00:39 /usr/bin/java -> /etc/alternatives/java
lrwxrwxrwx. 1 root root 23 Feb 10 00:39 /usr/bin/javac -> /etc/alternatives/javac
lrwxrwxrwx. 1 root root 25 Feb 10 00:39 /usr/bin/javadoc -> /etc/alternatives/javadoc
lrwxrwxrwx. 1 root root 23 Feb 10 00:39 /usr/bin/javap -> /etc/alternatives/javap
One option is to rename the PHP 7.4 files, so I'll rename them as follows:
mv /usr/bin/php /usr/bin/php74
mv /usr/bin/php-cgi /usr/bin/php74-cgi
After that, I create new alternatives:
alternatives --install /usr/bin/php php /usr/bin/php74 1
alternatives --install /usr/bin/php php /usr/bin/php56 2
alternatives --install /usr/bin/php-cgi php-cgi /usr/bin/php74-cgi 1
alternatives --install /usr/bin/php-cgi php-cgi /usr/bin/php56-cgi 2
The entries are now in alternatives:
update-alternatives --config php
There are 2 programs which provide 'php'.
Selection Command
-----------------------------------------------
1 /usr/bin/php74
*+ 2 /usr/bin/php56
Enter to keep the current selection[+], or type selection number:
It has created symlinks to alternatives
ll /usr/bin/php*
lrwxrwxrwx 1 root root 21 Feb 17 19:56 /usr/bin/php -> /etc/alternatives/php
lrwxrwxrwx 1 root root 32 Feb 15 21:31 /usr/bin/php56 -> /opt/remi/php56/root/usr/bin/php
lrwxrwxrwx 1 root root 36 Feb 15 21:31 /usr/bin/php56-cgi -> /opt/remi/php56/root/usr/bin/php-cgi
lrwxrwxrwx 1 root root 33 Aug 11 2021 /usr/bin/php56-pear -> /opt/remi/php56/root/usr/bin/pear
lrwxrwxrwx 1 root root 38 Feb 15 21:31 /usr/bin/php56-phar -> /opt/remi/php56/root/usr/bin/phar.phar
-rwxr-xr-x. 1 root root 6376328 Oct 11 01:34 /usr/bin/php74
-rwxr-xr-x. 1 root root 6375784 Oct 11 01:34 /usr/bin/php74-cgi
lrwxrwxrwx 1 root root 25 Feb 17 19:59 /usr/bin/php-cgi -> /etc/alternatives/php-cgi
-rwxr-xr-x. 1 root root 4741 Oct 11 01:34 /usr/bin/phpize
I tested updating PHP and it says PHP is no longer installed.
dnf update php
Last metadata expiration check: 0:28:58 ago on Fri 17 Feb 2023 07:41:07 PM AEDT.
Package php available, but not installed.
No match for argument: php
Error: No packages marked for upgrade.
How would I get alternatives to work with multiple versions of PHP and still be able to perform updates?
supmethods
(561 rep)
Feb 17, 2023, 09:03 AM
• Last activity: Feb 17, 2023, 02:50 PM
1
votes
2
answers
892
views
Zenity (or alternative) with custom file selector
When I use zenity and type `--file-selection`, if spawns the default GTK file selector. The problem with that is, of course, the lack of image thumbnails. Considering that I want to make an image selection like that, it is a bit of a downside. Is there a possibility to force zenity to use something...
When I use zenity and type
--file-selection
, if spawns the default GTK file selector. The problem with that is, of course, the lack of image thumbnails. Considering that I want to make an image selection like that, it is a bit of a downside.
Is there a possibility to force zenity to use something like nemo
or nautilus
as its file selector?
Or something like qarma
(it is a qt based rewrite of zenity). Can also be yad
etc.
Anyone got any alternatives?
I.P
(221 rep)
Jul 17, 2022, 04:49 PM
• Last activity: Nov 20, 2022, 11:15 AM
0
votes
1
answers
4611
views
Change from update-alternatives command not taking effect
I tried to change my PHP CLI version with `sudo update-alternatives --config php`: There are 2 choices for the alternative php (providing /usr/bin/php). Selection Path Priority Status ------------------------------------------------------------ 0 /usr/bin/php8.1 81 auto mode * 1 /usr/bin/php8.0.15 1...
I tried to change my PHP CLI version with
sudo update-alternatives --config php
:
There are 2 choices for the alternative php (providing /usr/bin/php).
Selection Path Priority Status
------------------------------------------------------------
0 /usr/bin/php8.1 81 auto mode
* 1 /usr/bin/php8.0.15 1 manual mode
2 /usr/bin/php8.1 81 manual mode
I set it to 0 and checked it with update-alternatives --display php
:
php - auto mode
link best version is /usr/bin/php8.1
link currently points to /usr/bin/php8.1
link php is /usr/bin/php
slave php.1.gz is /usr/share/man/man1/php.1.gz
/usr/bin/php8.0.15 - priority 1
/usr/bin/php8.1 - priority 81
slave php.1.gz: /usr/share/man/man1/php8.1.1.gz
It looks like it worked, but if I check it with php -v
then I get:
PHP 8.0.15 (cli) (built: Jun 7 2022 10:21:21) ( NTS )
Copyright (c) The PHP Group
Zend Engine v4.0.15, Copyright (c) Zend Technologies
command -v php
outputs /usr/local/bin/php
.
----------
I'm using Ubuntu 22.04 LTS
Black
(2138 rep)
Jun 8, 2022, 07:34 AM
• Last activity: Jul 4, 2022, 01:47 PM
2
votes
1
answers
482
views
A keynav alternative not dependent on X11?
Is there some alternative to `keynav` (a software that emulates mouse via keyboard) but without X11 dependencies?
Is there some alternative to
keynav
(a software that emulates mouse via keyboard) but without X11 dependencies?
Anderson Torres
(356 rep)
Sep 29, 2020, 04:33 AM
• Last activity: Mar 21, 2022, 09:06 PM
0
votes
2
answers
1027
views
How can I make the vimdiff command use the same Vim version as the vi and vim commands?
I've never worried about `vimdiff` on my own computer, where I have archlinux installed, so everything is up-to-date, generally speaking; I generally just used it, and I'm fine with it. After all, `:version` gives the same output whether I launch `vi`, or `vim`, or `vimdiff`. On my work computer (De...
I've never worried about
vimdiff
on my own computer, where I have archlinux installed, so everything is up-to-date, generally speaking; I generally just used it, and I'm fine with it. After all, :version
gives the same output whether I launch vi
, or vim
, or vimdiff
.
On my work computer (Debian 10), however, vimdiff
opens an older version of Vim than vi
or vim
.
I guess this has to do possibly with how I installed Vim and/or with /etc/alternatives
or something. It's been a long time I played around with such stuff though (without truly understanding it, likely), so I don't remember much.
---
**Feedback on [the answer](https://unix.stackexchange.com/a/695929/164309)** and comment(s)
ls -lF /etc/alternatives/ | grep bin/vim | sed 's/.*-> //' | sort -u
rsults in just in one result, namely /usr/bin/vim.gtk*
. How is it possible, then, that vimdiff
and vim
open different versions? Or have I misunderstood the answer?
The output of type -a vimdiff
is
vimdiff is /usr/bin/vimdiff
vimdiff is /bin/vimdiff
output of: type -a vim
vim is aliased to `/home/me/vim-dist/bin/vim'
vim is /usr/bin/vim
vim is /bin/vim
output of type -a vi
:
vi is aliased to `/home/me/vim-dist/bin/vim'
vi is /usr/bin/vi
vi is /bin/vi
Both /bin/vim --version | head -n 1
and /usr/bin/vim --version | head -n 1
have the same output:
VIM - Vi IMproved 8.1 (2018 May 18, compiled Jun 15 2019 16:41:15)
and that's the version that runs when I execute vimdiff
, older than the one that runs when I execute vim
/vi
.
Enlico
(2258 rep)
Mar 18, 2022, 09:52 AM
• Last activity: Mar 18, 2022, 08:09 PM
0
votes
1
answers
675
views
how to cd into previous directory
I am using Ubuntu and sometimes when I use ```cd -``` I don't go into the previous directory. And every time I get the directory which it ```cd```ed to. example:- ``` $cd - /home/[usrname]/Downloads $cd - /home/[usrname]/Downloads ``` is(/are) there and alternative(s)?
I am using Ubuntu and sometimes when I use
-
I don't go into the previous directory. And every time I get the directory which it
ed to. example:-
$cd -
/home/[usrname]/Downloads
$cd -
/home/[usrname]/Downloads
is(/are) there and alternative(s)?
user135142
(57 rep)
Jan 19, 2022, 05:41 AM
• Last activity: Jan 19, 2022, 06:09 AM
1
votes
0
answers
193
views
Workspaces/Desktops thumbnails without gnome
I've been trying Openbox and other window managers this week. I'm quite happy and committed to leaving Gnome DE behind. There's one feature I'm missing though: I like the workspace preview popup that Gnome has by default. The virtual desktops thumbnails help me keep a stronger grasp on what windows...
I've been trying Openbox and other window managers this week. I'm quite happy and committed to leaving Gnome DE behind.
There's one feature I'm missing though: I like the workspace preview popup that Gnome has by default. The virtual desktops thumbnails help me keep a stronger grasp on what windows are on which desktop.
I looked around but couldn't find an alternative.
> Maybe I lack the jargon?
**Would you please, recommend me alternatives to the workspace preview popup independent on the Gnome shell?**
Here's some links to posts with screenshots of the feature I'm looking for:
- [Post 1](https://unix.stackexchange.com/questions/243760/showing-thumbnails-or-some-kind-of-preview-in-the-gnome-workspace-switcher-popup)
- [Post 2](https://unix.stackexchange.com/questions/325256/how-to-change-style-of-gnome-3-workspace-switcher-dock-background)
Keywords I tried searching online:
- (Virtual workspace|workspace|desktop) (preview|thumbnail|miniature)
Pedro Lima
(11 rep)
Dec 29, 2021, 12:34 PM
11
votes
2
answers
6330
views
update-alternatives just for one user
I'm using a shared server. On that server different versions of Java are installed: Selection Path Priority Status ------------------------------------------------------------ 0 /usr/lib/jvm/java-6-openjdk/jre/bin/java 1061 auto mode * 1 /usr/lib/jvm/java-6-openjdk/jre/bin/java 1061 manual mode 2 /u...
I'm using a shared server.
On that server different versions of Java are installed:
Selection Path Priority Status
------------------------------------------------------------
0 /usr/lib/jvm/java-6-openjdk/jre/bin/java 1061 auto mode
* 1 /usr/lib/jvm/java-6-openjdk/jre/bin/java 1061 manual mode
2 /usr/lib/jvm/java-6-sun/jre/bin/java 63 manual mode
I would like to choose the Second options, but if I tried to do that it complains that I do not have the permissions (I'm not root).
Is there a way to do that in "user-space"?
Can the Root user make this preference works only for me?
Aslan986
(521 rep)
Jan 15, 2013, 10:49 AM
• Last activity: Sep 29, 2021, 10:57 PM
4
votes
0
answers
939
views
Are there any "richer" alternatives to cp and mv (like bat to cat and exa to ls)?
`ls` has [exa](https://github.com/ogham/exa). `cat` has [bat](https://github.com/sharkdp/bat). I don't know of a direct alternative to `rm`, but it also has [rmtrash](https://github.com/PhrozenByte/rmtrash). All of these can usually work as drop-in alias replacements, retaining usual function and op...
ls
has [exa](https://github.com/ogham/exa) . cat
has [bat](https://github.com/sharkdp/bat) . I don't know of a direct alternative to rm
, but it also has [rmtrash](https://github.com/PhrozenByte/rmtrash) .
All of these can usually work as drop-in alias replacements, retaining usual function and options of their commands but also including additional options, better highlighting and formatting and better defaults.
I still use the much more portable builtins in scripts, but richer commands make day-to-day shell use much more comfortable.
Are there such alternatives to cp
and mv
?
The main feature that comes to mind is a progress bar, but another one would be a better overview of the action in interactive mode, and I'm sure there are many more potential improvements.
Atai Ambus
(43 rep)
Sep 9, 2021, 05:34 PM
• Last activity: Sep 9, 2021, 06:44 PM
Showing page 1 of 20 total questions