User Tools

Site Tools


quick_tips

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
quick_tips [2013/07/04 00:27]
127.0.0.1 external edit
quick_tips [2019/02/09 10:31] (current)
Line 8: Line 8:
  
 ==== Some Starter Commands ==== ==== Some Starter Commands ====
-Hi. My name is Joe, and we are using my computer (named buster) for this introduction to some common commands. Some keyboard shortcuts will also appear, without explanation.These commands are in a sequence, so work your way through the first time, but each is typed at a prompt. All will also work in a console, but you can scroll up and down in a gnome terminal to compare results such as ls command's. You can  also type man "command name" to view manual pages, and type q to exit man page. <code>$ man ls                                    #type  q to exit man page </code> All comands and most programs have man pages+Hi. My name is Joe, and we are using my computer (named buster) for this introduction to some common commands. Some keyboard shortcuts will also appear, without explanation.These commands are in a sequence, so work your way through the first time, but each is typed at a prompt. All will also work in a console, but you can scroll up and down in a gnome terminal to compare results such as ls command's. You can  also type man "command name" to view manual pages, and type q to exit man page. <code>$ man ls                   #type  q to exit man page </code> All commands and most programs will have man page
  
 ==== Directories ====  ==== Directories ==== 
Line 21: Line 21:
  
 ==== Terminal ==== ==== Terminal ====
-When we open a terminal,(ctrl+ alt+ T) we are, by default, in our home folder (or directory). The words on the screen before we type anything are called a prompt.  mine says joe@buster:~$ That's user@hostname :~$  The  Tilda after the colon tells me that I am in my home directory, and the $ tells me that I am normal user. If it is a #, I am super user.   See [[sudo|sudo]]  for more info.+When we open a terminal,(ctrl+ alt+ T) we are, by default, in our home folder (or directory). The words on the screen before we type anything are called a prompt.  mine says joe@buster:~$ That's user@hostname :~$  The  Tilda after the colon tells me that I am in my home directory, and the $ tells me that I am normal user. If it is a #, I am super user.   See [[sudo|sudo]] for more info.
 ==== pwd ====  ==== pwd ==== 
 Type pwd and press enter.The reply is /home/joe, for me. pwd stands for Print Working Directory, and can be used any time you want to know where you are, Try it as we go to see the path to find your way back later. You noticed that you are now back at the prompt? The command line does what you tell it, and comes back to the prompt. no news is good news! If it can't do what you tell it, it will print an error message. Type pwd and press enter.The reply is /home/joe, for me. pwd stands for Print Working Directory, and can be used any time you want to know where you are, Try it as we go to see the path to find your way back later. You noticed that you are now back at the prompt? The command line does what you tell it, and comes back to the prompt. no news is good news! If it can't do what you tell it, it will print an error message.
 ==== ls ==== ==== ls ====
- 
  
 now type ls enter. ls lists directory contents, in numeric/alphetic order. the list you now have on your screen is __Some__ of the contents of your home dir. The names without extensions are directories Inside your home  dir.    now type ls enter. ls lists directory contents, in numeric/alphetic order. the list you now have on your screen is __Some__ of the contents of your home dir. The names without extensions are directories Inside your home  dir.   
Line 32: Line 31:
 Our Home dir contains many other files and dirs that are hidden by default. They are mostly program configuration, settings and data files used by the program. You can look, but be careful, it is easy to break things here. type ls -a to see all. Our Home dir contains many other files and dirs that are hidden by default. They are mostly program configuration, settings and data files used by the program. You can look, but be careful, it is easy to break things here. type ls -a to see all.
 ==== cd ==== ==== cd ====
- 
  
 Now we have seen that there are directories in our home that we can't see the contents of. Let's say we downloaded the new Vinux, and want to use it on a spare computer.By default, what we download is stored in Downloads. ls showed us Downloads is in home, so we need to change directories.we use cd for this. type cd Downloads     My prompt now is joe@buster:~/Downloads$ The ~ still means home, the forward slash means that Downloads is inside home. now if we type ls   we will see that the new vinux is inside  Downloads!  So as pwd returns /home/Downloads we add   /vinux4.0-dvd-i386.iso to form the path for the new .iso. Now we have seen that there are directories in our home that we can't see the contents of. Let's say we downloaded the new Vinux, and want to use it on a spare computer.By default, what we download is stored in Downloads. ls showed us Downloads is in home, so we need to change directories.we use cd for this. type cd Downloads     My prompt now is joe@buster:~/Downloads$ The ~ still means home, the forward slash means that Downloads is inside home. now if we type ls   we will see that the new vinux is inside  Downloads!  So as pwd returns /home/Downloads we add   /vinux4.0-dvd-i386.iso to form the path for the new .iso.
Line 40: Line 38:
 To create a bootable USB stick from the ISO image you can use the command: To create a bootable USB stick from the ISO image you can use the command:
  
-**Example 1** +** Example 1 ** 
 <code> <code>
 $ sudo dd if=vinux-4.0-dvd-i386.iso of=/dev/sdb $ sudo dd if=vinux-4.0-dvd-i386.iso of=/dev/sdb
 </code>  </code> 
    
-**Example 2**+** Example 2 **
 <code> <code>
 $sudo dd if=/home/joe/Downloads/vinux-4.0-dvd-i386.iso of=/dev/sdb $sudo dd if=/home/joe/Downloads/vinux-4.0-dvd-i386.iso of=/dev/sdb
Line 60: Line 58:
 An incorrect if device in the command can result in the __overwriting and destruction of data!__ An incorrect if device in the command can result in the __overwriting and destruction of data!__
  
-Device letters can change when they are reconnected or the computer is rebooted, so reuse one of the methods above to double check if you have any doubt as to what your usb-stick is being called, and double check your typing before pressing enter.+Device letters can change when they are reconnected or the computer is rebooted, so reuse one of the methods above to double check if you have any doubt as to what your USB-stick is being called, and double check your typing before pressing enter.
  
  
 ==== More Commands ==== ==== More Commands ====
-here are some commands to give you more information about, and work with files and programs on your Vinux computer. Unles otherwise stated they can be run in a console or gnome-terminal and are likely to work on most Linux and many other Unix systems.+here are some commands to give you more information about, and work with files and programs on your Vinux computer. Unles otherwise stated they can be run in a console or Gnome-terminal and are likely to work on most Linux and many other Unix systems.
  
  ====ls -o ====  ====ls -o ====
-Sometimes you will want to see more information about a file or files in a directory than is shown with the simple [[ls|ls]] command. Perhaps you have files with similar names and can't remember which contains what, but you know that the one you want was written in March, or is around 3KB, (3 kilobytes), in size. The ls command with the -o option can help you out. Here is a line of output I got with ls -o.\\+Sometimes you will want to see more information about a file or files in a directory than is shown with the simple [[ls|ls]] command. Perhaps you have files with similar names and can't remember which contains what, but you know that the one you want was written in March, or is around 3KB, (3 kilobytes), in size. The ls command with the -o option can help you out. Here is a line of output when typing ls -o.\\
 -rw-r--r-- 1 burt   613 Feb 19 23:46 webbiz.html -rw-r--r-- 1 burt   613 Feb 19 23:46 webbiz.html
-The letters at the beginning refer to permissions, r for read, w for write and if there is an x it means that the file is executable. Permissions are shown in three groups, first the file's owner's permissions, then those for the group that bears the owner's name and last for anyone else using the computer. Next comes the file's owner, the file size in bytes, the date and time the file was last modified and finally the file name with its extension if it has one. In the example the owner, "burt" has permission to read and write to the file and both those in the group "burt" and anyone else can read the file. It is an html file that contains 613 bytes of data and was last modified on Feb. 19 at 11:46. at night.+The letters at the beginning refer to permissions, r for read, w for write and if there is an x it means that the file is executable. Permissions are shown in three groups, first the file's owner's permissions, then those for the group that bears the owner's name and last for anyone else using the computer. Next comes the file's owner, the file size in bytes, the date and time the file was last modified and finally the file name with its extension if it has one. In the example the owner, "burt" has permission to read and write to the file and those in the group "burt" and anyone else can read the file. It is an html file that contains 613 bytes of data and was last modified on Feb. 19 at 11:46. at night.
  
 There are many options available with the ls command that control what information is shown about files and sub-directories, how they are sorted, units used, etc. These optioncs can be combined like There are many options available with the ls command that control what information is shown about files and sub-directories, how they are sorted, units used, etc. These optioncs can be combined like
 <code>$ ls -ao</code> <code>$ ls -ao</code>
-to show permissions, ownership, filesize, and date last modified for all files and dirs including the ones that start with a dot, ".", that are hidden. For more on the -a option see [[ls_-a|ls -a]] in the [[starter_commands|Some Starter Commands]] section. Putting a file name after your option(s) will give info on that one file instead of all files in the working directory. Type+to show permissions, ownership, filesize, and date last modified for all files and dirs including the ones that start with a dot, ".", that are hidden. For more on the -a option see [[ls_-a|ls -a]].  
 +Putting a file name after your option(s) will give info on that one file instead of all files in the working directory. Type
 <code>$ ls -o some_file.txt</code> <code>$ ls -o some_file.txt</code>
 for info on the file called some_file.txt. for info on the file called some_file.txt.
quick_tips.1372861653.txt.gz · Last modified: 2019/02/09 10:31 (external edit)