& operator sends a process to background; as
cd can be run without arguments you are running it and sending it to background. If you take the man page:
cd - Change the shell working directory.
Change the shell working directory.
Change the current directory to DIR. The default DIR is the value of the
HOME shell variable.
CDPATH defines the search path for the directory containing
DIR. Alternative directory names in
CDPATH are separated by a colon (:).
A null directory name is the same as the current directory. If DIR begins
with a slash (
CDPATH is not used.
If the directory is not found, and the shell option
cdable_vars is set,
the word is assumed to be a variable name. If that variable has a value,
its value is used for DIR.
-L force symbolic links to be followed
-P use the physical directory structure without following symbolic
The default is to follow symbolic links, as if
-L were specified.
Returns 0 if the directory is changed; non-zero otherwise.
GNU bash, version 4.1.5(1)-release (i486-pc-linux-gnu)
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
You can see the arguments are optional. So
cd & is processed as
cd and then send to background. When
cd is called with no argument no processing is needed. So it goes to background as "done" (processed).
Some info regarding
& (ampersand) is a builtin control operator used to fork processes. From the Bash man page, "If a command is terminated by the control operator
&, the shell executes the command in the background in a subshell".
If logged into an interactive shell, the process is assigned a job number and the child PID is displayed. The job number below is one.
bash$ sleep 30 &
Note that when a process is forked, the child PID is stored in the special variable
bash$ echo $!
You can terminate the job by its job number like so:
+ Running sleep 30 &
bash$ kill %1
+ Terminated sleep 30