SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
userx@SlackO:~$ sudo rm /usr/bin/fortune
userx@SlackO:~$ nano .bash
#changed dir to look in from /usr/bin to what it says now
[[ -f /usr/games/fortune ]] && /usr/games/fortune | cowsay -f tux -n
it works -- not working due to human error of a typo in /etc/profile path statement.
I got /bin/fortune off a website so that is where I looked until I did a whereis then see that it is actually install so I just soft linked it then that stopped the error in BASH terminal,
going to go look in that .sh file
nothing here to get upset or worried about.
No upset, worry or lost sleep here, just trying to help - but with some certainty and clarity of what the problem and solution actually were, for posterity.
I thought you meant that you downloaded /bin/fortune from a random website, but I may have misunderstood. I now think that you meant the idea for the symlink came from a random website. Eliminating the randomness helps!
Glad to know that the path change was really the original problem, thanks for confirming that.
"command not found"? Huh? Caused by 'bad' distro (which HAS a root password!)[?] *J/K*
Code:
user@ubuntu:~$ fortune
The program 'fortune' is currently not installed. You can install it by typing:
sudo apt install fortune-mod
user@ubuntu:~$ cowsay
The program 'cowsay' is currently not installed. You can install it by typing:
sudo apt install cowsay
user@ubuntu:~$
Code:
mint@mint ~ $ fortune|tee /dev/tty|cowsay -f tux -n
Never reveal your best argument.
__________________________________
< Never reveal your best argument. >
----------------------------------
\
\
.--.
|o_o |
|:_/ |
// \ \
(| | )
/'\_ _/`\
\___)=(___/
mint@mint ~ $
"command not found"? Huh? Caused by 'bad' distro (which HAS a root password!)[?] *J/K*
user@ubuntu:~$ fortune
The program 'fortune' is currently not installed. You can install it by typing:
sudo apt install fortune-mod
From what I can see, all that happened was the OP busted the system's default $PATH, which includes /usr/games (i.e., where the fortune binary is located). It has nothing to do with the program "not being installed", so your "apt install" stuff doesn't make sense.
As for Ubuntu's "lack of root password", I don't see anything particularly great about it. You can get a full root shell with "sudo su" (and just your user password). Also I believe that Ubuntu caches sudo credentials for a while, so during that time root commands are just lying open (e.g., sudo 'whatever' will work without any password at all). Personally I prefer to have sudo configured in a much more limited way, but each to their own, there's certainly nothing wrong with the way Slackware does it
Regarding the actual problem, these commands would have been useful;
Code:
# fortune
bash: fortune: command not found
# whereis fortune
fortune: /usr/games/fortune /usr/man/man6/fortune.6.gz
# /usr/games/fortune
Some people are born mediocre, some people achieve mediocrity, and some
people have mediocrity thrust upon them.
-- Joseph Heller, "Catch-22"
# echo $PATH
/usr/local/bin:/bin:/usr/bin
### conclusion: /usr/games was removed from the system path
in all actuality this is my path statement that was screwed up, I added /opt and didn't hit the shift key hard enough I do suppose so it screwed up the path at game.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.