The solution of push D command execution error (/ bin / sh: 1: push D: not found) on Ubuntu
View reason: enter the / bin directory to view the link file of SH, which is shown as follows: the SH command is linked to dash, while the pushd command needs to be executed in the bash environment.
Solution: execute the sudo dpkg reconfigure dash command and set the dash to No.
Check again: the link to check SH has been changed to bash.