Background and setup:
I did a new installation of Debian 11 on an old PC (fitpc2) with an Intel Atom processor.
I did a command line installation of the i386 image and opted for the SSH server and the standard system utilities.
I set the root password and defined one user (myself) and chose a separate home partition which I set to the maximum size.
I succeeded with access from a Windows 10 desktop using Putty and I set up smb server since the Debian PC will be a file server for music and photos.
My problems:
-I cannot make basic commands work. I can only give root commands by typing just su and then the administrator pathword, i.e. logging in as root. I would rather type e.g. su update (or su apt-get...), but I get an error message user update (apt-get) does not exist. Am I missing something?
-I cannot make any shutdown commands work. With the commands shutdown and poweroff I just get an error message that the command does not exist. The only reboot that works is ctrl+alt+del. What am I missing?
Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230
Basic commands not working
-
- df -h | grep > 20TiB
- Posts: 1418
- Joined: 2012-10-06 05:31
- Location: /dev/chair
- Has thanked: 79 times
- Been thanked: 191 times
Re: Basic commands not working
Uhh, yeah. su takes a username as the first argument, it always has. You likely want sudo [command] or su -c [command].
Yup, reading the manual. See 'man su'. Also 'man sudo', 'man bash' and 'man whereis'.
Command not found is expected, as /sbin (location of the shutdown binary) and /usr/sbin are not in a normal (non-root) users PATH by default. Generally you need superuser privileges to use stuff in there anyway.
If you're trying shutdown as root, you might have a look here WRT changes to the su command and setting PATH.
Once is happenstance. Twice is coincidence. Three times is enemy action. Four times is Official GNOME Policy.
Re: Basic commands not working
Thank you. Looks like some things have changed since Debian Lenny
You are right, I should be using sudo now. I thought it was included but obviously the command needs to be installed and user added to sudoers.
Now it looks like that took care of the other problem as well because shutdown commands and other commands are now accessible. Great!
You are right, I should be using sudo now. I thought it was included but obviously the command needs to be installed and user added to sudoers.
Now it looks like that took care of the other problem as well because shutdown commands and other commands are now accessible. Great!
Re: Basic commands not working
Yes things changed but that doesn't mean you should be using sudo. su changed to su -, that's all.
Re: Basic commands not working
For all users who have this "commands not working" issue. I have a recommendation. Every time you have a coffee break take one command from /bin or /sbin and read up on it. Won't take long, your commands will start working.
- sunrat
- Administrator
- Posts: 6479
- Joined: 2006-08-29 09:12
- Location: Melbourne, Australia
- Has thanked: 118 times
- Been thanked: 474 times
Re: Basic commands not working
There was a recent thread about a possible bug where apt-get command didn't work whereas the same command using the newer apt worked fine.
viewtopic.php?t=150414
https://linux.debian.bugs.dist.narkive. ... -to-accept
I find apt is better for most purposes anyway. Another change since Lenny.
viewtopic.php?t=150414
https://linux.debian.bugs.dist.narkive. ... -to-accept
I find apt is better for most purposes anyway. Another change since Lenny.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ” Remember to BACKUP!
Those who have lost data
...and those who have not lost data YET ” Remember to BACKUP!