|
|
short command's for in linux text mode |
| cd |
This command is used to change the directory and using this command will change your location to what ever directory you specify
cd hello
will change to the directory named hello located inside the current directory
cd /home/games
will change to the directory called games within the home directory.
As you can see you can specify any directory on the Linux system and change to that directory from any other directory. There are of course a variety of switches associated with the cd command but generally it is used pretty much as it is.
Type man cd for more information on the cd command. |
| chmod |
This command is used to change the mode for files to know more about this command go to the Permissions (Setting up the mode)section. You can get there by using this link chmod you will need to use the back button (or go through the linux home page menu) on your browser to get back here).
|
| cp |
The cp command copies files. You can copy a file in within the current directory or you can copy files to another directory.
cp myfile.html /home/help/mynewname.html
This will copy the file called myfile.html in the current directory to the directory /home/help/ and call it mynewname.html.
Simply put the cp command has the format of
cp file1 file2 With file1 being the name (including the path if needed) of the file being copied and file2 is the name (including the path if needed) of the new file being created.
Remember with the cp command the original file remains in place.
Type man cp to see more about the cp command.
|
| df |
The disk free command shows how much memory is being used and how much is free for every partition and mounted file system (including any Windows drive/s).
Type man df for more information about the df command.
|
| du |
The disk usage command shows how much memory is being used by each directory below that from which the command was given. If du is run from the root directory it will show the memory used by every directory on the system, including any mounted file systems (including other drives) such as any Windows related drives.
Type man du for more information about the du command.
|
| find | The find command is used to find files and or folders within a Linux system. To find a file using the find command you type find /usr/bin -name filename this will search inside the /usr/bin directory (and any sub directories within the /usr/bin directory) for the file named filename. To search the entire filing system including any mounted drives use find / -name filename and the find command will search every file system beginning in the root directory. The find command can also be used to find command to find files by date and the find command happily understand wild characters such as * and ? Type man find for more information on the find command. |
| head | The head command list the first lines of a file. By default it will display the first ten lines of a file. For example head filename will list the first ten lines of the file named filename. You can also select how many lines to show for example head -5 filename will list the first 5 lines of the file named filename. The format for the head command is head -n filename With the number of lines to be displayed being n and the file name of the file, including the path if needed, you wish to view being in place of filename. Type man head for more information on the head command. |
| killall name | type for name the programme that you like to kill |
| less |
This command allows you to scroll through a file a page at a time. The less command is very similar to the more command only it is more advanced and has more features associated with it.
less filename
Type man less for more information on the less command.
|
| ls |
shows what is in a map
|
| ls -l |
shows what's in a map in details
|
| mkdir |
The mkdir command is used to create a new directory.
mkdir mydir
This will make a directory (actually a sub directory) within the current directory called mydir.
Type man mkdir to see more about the mkdir command.
|
| mv |
The mv command moves files from one location to another. With the mv command the file will be moved an no longer exist in its former location prior to the mv. The mv command can also be used to rename files. You can move files within the current directory or another directory.
cp myfile.html /home/help/mynewname.html
This will move the file called myfile.html in the current directory to the directory /home/help/ and call it mynewname.html.
Simply put the mv command has the format of
mv file1 file2 With file1 being the name (including the path if needed) of the file being moved and file2 is the name (including the path if needed) of the new file being created.
Type man mv to see more about the mv command.
|
| ps |
The ps (process status) will by default only show the processes that you as a user have started. However Linux is always running background tasks so you may want to use some of the common switches associated with the ps such as ps au to display the processes running for all users and in the user format hence we get to see every process that is running on the system.
When a process is started it is given among other things a PID number that is unique to it. This PID number can be seen by using the ps command or top command. By knowing a Process ID number you may opt to kill the process if you choose.
|
| pwd |
The pwd command (print working directory) will display the current directory.
e.g.
typing
pwd
will display something similar to this /home/games/help
being the details of the current directory.
To get help with the pwd type /bin/pwd --help and a short help file will be displayed. Type man pwd to get more information about the pwd command.
|
| reboot |
restart your computer (sometime's only for root who can do that)
|
| rm |
The rm command is used to delete files. Some very powerful switches can be used with the rm command so be sure to check the man rm file before placing extra switches on the rm command.
rm myfile
This will delete the file called mydir. You can include a path to delete a file in another directory for example rm /home/hello/goodbye.htm will delete the file named goodbye.htm in the directory /home/hello/.
Some of the common switches for the rm command are
* rm -i this operates the rm command in interactive mode meaning it will prompt you before deleting a file. This gives you a second chance to say no do not delete the file or yes delete the file. Remember Linux is merciless and once something is deleted it is gone for good so the -i flag (switch) is a good one to get into the habit of using.
* rm -f will force bypassing any safeguards that may be in place such as prompting. Again this command is handy to know but care should be taken with its use.
* rm -r will delete every file and sub directory below that in which the command was given. Be very careful with this command as no prompt will be given in most linux systems and it will mean instant good bye to your files if misused.
|
| rmdir |
The rmdir command is used to delete a directory.
rmdir mydir
This will delete the directory (actually a sub directory) called mydir.
Type man rmdir to see more about the rmdir command.
|
| screen |
Type screen -R and go on with your work. CLose te console.NOt with typeing exit. A other time open a console and type screen -R and there is your work. * screen opens an new screen * screen -R open or return to a screen * screen -D close session and let screen open on computer or press * screen -x enter a multiply screen. * exit close and exit a screen * screen -list give a list of screens that are in use. * screen -S name give a name to a screen. * screen -r pid number, (screen -r 1549). The pid number you can see by -list |
| shutdown -h now |
log off the computer and turn off the power (sometime's only for root who can do that)
|
| startx |
start up de graphic shield of linux
|
| switchdesk name |
type a name like gnome or kde. linux wil start that shield for X
|
| tail |
The tail command list the last lines of a file. By default it will display the last ten lines of a file.
For example tail filename
will list the last ten lines of the file named filename.
You can also select how many lines to show
for example
tail -5 filename
will list the last 5 lines of the file named filename.
The format for the tail command is
tail -n filename With the number of lines to be displayed being n and the file name of the file you wish to view, including the path if needed, being in place of filename.
Type man tail for more information on the tail command.
|
| tree |
This will give a graphical display of the structure of a particular directory and all sub directories, files and links within that directory.
|
| top |
shows what is running how long the computer is on and things aboute the memory
The vi command is actually a text editor that comes as standard with most Linux packages.
Type man vi for more information on vi.
|
| vi |
The vi command is actually a text editor that comes as standard with most Linux packages.
Type man vi for more information on vi.
|
| xload |
Either typing xload or selecting xload from the xwindows menu (if it is available) will activate the xload feature in a x11 window. The xload application provides a running graph of the system load. Often it is easier to tell if a system is overloaded by having a visual aid to see the load on the system. The xload command has eight different command line options and can be customized in regards to colour, scale and background.
Typically xload is run as a background task to enable visual monitoring of the system load.
Type man xload to see more detailed information about the xload command.
| scp filename.jpg name@192.168.100.3:/home/name | from linux to linux |