The cd command will allow you to change the directory you are in (cd stands simply for "change directory"). When you open a terminal you will be in your home directory. Examples:
To navigate into the root directory, type:
cd /
Om naar uw persoonlijke map te gaan, typt u:
cd
of
cd ~
Om naar de bovenliggende map te gaan, typt u:
cd ..
Om naar de vorige map te gaan, typt u:
cd -
Geef het gehele pad waar u heen wilt op om door meerdere directory-niveau's ineens te navigeren. Bijvoorbeeld, typ:
cd /var/www
om rechtstreeks naar de /www
submap van /var/
te gaan. Een ander voorbeeld, typ:
cd ~/Desktop
om naar de Desktop
(Bureaublad) map in uw persoonlijke map te gaan.
The pwd command will allow you to know in which directory you're located (pwd stands for "print working directory"). For example, typing
pwd
in the Desktop
directory, will show
~/Desktop
.
![]() |
|
The Xfce4 Terminal also displays this information in the title bar of its window. |
The ls command will allow you to see the files in the directory you are in (ls stands simply for "list"). Used with certain options, you can see sizes of files, when files where made, and permissions of files. For example, typing
ls ~
will show you the files that are in your home directory. Examples:
To list all the files (including hidden files), type:
ls -a
To list information in a long format, type:
ls -l
. This will include information about permissions, owner, and last modification time.
To list your root patition, type:
ls /
To list one time per line, type:
ls -1
The cp command will make a copy of a file for you (cp stands simply for "copy"). For example, type:
cp file foo
to make
a exact copy of file
and name it
foo
, but the file file
will still be there.
mv: The mv command will move a file to a different location or will rename a file (mv stands simply for "move"). Examples:
To rename a file named file
to foo
, type:
mv file foo
.
To move the file foo
to your Desktop
,
type:
mv foo ~/Desktop
. This will move foo but will not rename it. You must specify a new file name to rename a file.
![]() |
|
Als u mv gebruikt met with sudo zult u de afkorting ~ niet kunnen gebruiken, maar zult u volledige padnamen voor uw bestanden moeten gebruiken. Dit is omdat als u als root werkt, ~ naar de persoonlijke map van de root zal verwijzen, niet naar uw eigen persoonlijke map. |
The rm will remove or delete a file in your directory (rm stands simply for "remove"). It will not work on directories which have files in them. To remove directories, you can use rm -r. The r stands for recursive. For example:
rm -r foo
will remove the directory named foo and all of its contents.
![]() |
|
Using rm -r will delete a complete directory and everything in it without further questions, so be careful with this command. |