If you are in your home folder and give the command 'ls' it will show you the files and folders in that location-e.g:
/*I am using Bold to present command input and Italic to present display output*/
ls
Desktop Documents Examples Music Pictures Public Templates Videos
most commands take arguments. like cd (change directory) it will jump to the directory followed in the command. e.g:
cd Documents
or
cd location
If you want to go to any folder directly just type full address in the location field. for example if you want to go to "/home/shabab/Pictures/" type
cd /home/shabab/Pictures
or you can also go step by step
cd /
cd home
cd shabab
cd Pictures
The firs '/' goes to the root directory (like C:\ in windows). And you can figure out the other steps. Be careful about one thing that linux terminal is case sensitive. So if you type 'pictures' instead of 'Pictures' it wont work.
bash: cd: pictures: No such file or directory
Many commands also has command options. like adding the option after command will make it work. Like ls shows all files folders in a directory. But if you also want to see the hidden ones add –a, which causes all files to be listed including hidden ones.e.g:
ls -a
. .esd_auth .ICEauthority .recently-used
To see the details of all elements.
ls -l
Command options can also be combined. To see details of hidden files
ls -la
To see a list of available command options add --help. e.g:
ls --help or
cp --help
To run a command from your current location. Write the command after ' ./ ' many experts interpret it as 'right here'. It is a good way to remember. E.g:
./browser
will run a program called browser located in current directory.
To read the manual of any package
man
e.g.
man gcc
shall open the manual of gnu compiler collection
No comments:
Post a Comment