Once AWS SAM CLI is installed/setup in your system, you will need to give a reference to sam.cmd file.
In windows, you can give an alias to the folder where SAM is setup
alias sam=”/c/Program\ Files/Amazon/AWSSAMCLI/bin/sam.cmd”
In linux,
$ vi ~/.bashrc
alias = sam=”sam.cmd”
$ source ~/.bashrc