Bash: /usr/bin/cp: No such file or directory

Hi,
I have installed home-manager standalone after that system does not find command
$ cp --help
bash: /usr/bin/cp: No such file or directory

$ whereis cp
cp: /nix/store/hxvv2x97c78r3bmzvq1xr9pdba6ir50c-system-path/bin/cp

How can I fix the problem?

What does type -a cp say?

Unfortunately, same result: “No such file or directory”.
the same in bash with root.

/ config zsh #
programs = {

zsh = {
enable = true; };
zsh.ohMyZsh = {
enable = true; };
};
environment.shells = with pkgs; [ zsh ];
/ confg zsh end #

I tray with: users.defaultUserShell = pkgs.zsh;
let’s see.

Can you provide the literal output? I don’t think this is what bash’s type builtin would say; if the command wasn’t on PATH I’d expect something more like:

$ type -a oops
-bash: type: oops: not found
1 Like

I have removed all zsh from config, it did not help.
Maybe they broke the links or it’s my simple config that worked in older versions or home-manager is doing the problem. env?
Here’s the test in the home folder:
[user@nixos:~]$ cp -a test.copy test
bash: /usr/bin/cp: No such file or directory

Many thanks to @abathur,
I found errors, that was my mistake.
In the aliases was path [ /usr/bin/cp ] written out.
Now it works.