This is possible on a Mac and Linux
Note: You should also be able to use .profile file, but I do not use it. I just use .bash_profile, because it more specific, like .bashrc on linux, rather than .cshrc.
Make a directory mapping (set a variable) to the desktop.
In Terminal.app, run
nano ~/.bash_profile OR nano $HOME/.bash_profile
Add the following somewhere in your file.
(for example, pathtodesktop="$HOME/Desktop")
Quit Terminal and restart or run
Finished! Your new variable should function just like $HOME or ~, except to whichever path you choose.
In order to test it you could run:
Just follow the same instructions, except the file you want to edit is under $HOME/.bashrc or $HOME/.bash_profile.
Above and Beyond the Question
If you have a command that you frequently run, you could create an alias in your .bash_profile as well like this:
alias dt="cd $HOME/Desktop"
Refresh your terminal paths by restarting terminal or with
Type just dt and your path should change to the Desktop