4

How can I make a directory on the desktop? I tried cd /desktop command but it gives an error no such file or directory.

What's the correct command?

Zanna
  • 70,465
vandit
  • 41

2 Answers2

7

From command line

cd ~/Desktop
mkdir yes

will make a directory named "yes" inside your current user's "Desktop". It will almost instantly show up on your desktop.

You can also do

mkdir ~/Desktop/yes

In case of language other than English where the directories are named into another language this is a more generic way:

source $HOME/.config/user-dirs.dirs
cd $XDG_DESKTOP_DIR
mkdir yes

or

source $HOME/.config/user-dirs.dirs
mdir $XDG_DESKTOP_DIR/yes
Rinzwind
  • 299,756
5

The command to make a directory is mkdir 'Directory name' , cd 'Directory name' is the command used to go inside an existing directory.