Difference between revisions of "Linux Tutorial- Part: 1"

From Sector Alpha Wiki
Jump to: navigation, search
(Basic controls)
(Navigating The Workspace)
 
(3 intermediate revisions by the same user not shown)
Line 6: Line 6:
 
Once you input that command, you will be prompted to enter the password you made (Hopefully in part 0 of this tutorial. You now *should* be in the main minecraft '''directory'''. When you see the word '''directory''', you mind should automatically convert the word to '''folder'''. They're essentially the same thing, and have the same functions. So, you're in the main directory, but how do you see everything that's in? Well little Joey, the answer is simple. Use the command <code>ls</code> to see absolutely everything in a directory. <code>ls</code>  stands for '''list''', as in '''list''' everything inside this folder. The colours of the files stand for different things (which I will glaze over in a bit), so don't be intimidated by them.
 
Once you input that command, you will be prompted to enter the password you made (Hopefully in part 0 of this tutorial. You now *should* be in the main minecraft '''directory'''. When you see the word '''directory''', you mind should automatically convert the word to '''folder'''. They're essentially the same thing, and have the same functions. So, you're in the main directory, but how do you see everything that's in? Well little Joey, the answer is simple. Use the command <code>ls</code> to see absolutely everything in a directory. <code>ls</code>  stands for '''list''', as in '''list''' everything inside this folder. The colours of the files stand for different things (which I will glaze over in a bit), so don't be intimidated by them.
  
Now comes the guts of navigation, changing directories. As I mentioned before, every file on Linux is colored to represent different things. For example, a '''directory''' is blue, and a .jar file is red. Use <code>ls</code> to view the files in the '''directory''', and look at which ones are coloured blue. Because you're inside the Minecraft '''directory''', you should see the '''directory''' <code>split_worlds</code>. Alright, here comes the exciting part. Use the command <code>cd split_worlds</code> to go to the '''directory'''! Alright, it's not that exciting, but writing this tutorial is a bit dull and I need to entertain myself ''somehow''. Anyways, the <code>cd <directory name> </code> command is probably the command you will use most in navigation, and it stands for '''change directory'''. As you may have noticed, the name if the directory you're in is shown write before the input (Where you type). If you use the command <code>cd games</code>, it should say <code>minecraft@localhost/split_worlds/games/:</code>. Now, as you noticed, it took two commands to get to this point. These two commands can be shortened to one by using the command <code>cd /split_worlds/games/</code>. This is especially useful when you have to get deeply nested '''directories''' faster. But how do we get back to the main directory? Well little Joey, there are two simple ways. If we want to go from the '''games''' directory to the '''split_worlds''' directory, you can use the command <code>cd ..</code>. All this command does is brings you to the previous directory, so in this case you would be in the directory '''split_worlds'''. Now for command number two. The <code>cd</code>, without any directory name after it. This command will bring you back to the main directory. It is a very useful command when you're really nested deep in a directory, and you don't want to use <code>cd ..</code> a bunch of times.
+
Now comes the guts of navigation, changing directories. As I mentioned before, every file on Linux is colored to represent different things. For example, a '''directory''' is blue, and a .jar file is red. Use <code>ls</code> to view the files in the '''directory''', and look at which ones are coloured blue. Because you're inside the Minecraft '''directory''', you should see the '''directory''' <code>split_worlds</code>. Alright, here comes the exciting part. Use the command <code>cd split_worlds</code> to go to the '''directory'''! Alright, it's not that exciting, but writing this tutorial is a bit dull and I need to entertain myself ''somehow''. Anyways, the <code>cd <directory name> </code> command is probably the command you will use most in navigation, and it stands for '''change directory'''. As you may have noticed, the name of the directory you're in is shown write before the input (Where you type). If you use the command <code>cd games</code>, it should say <code>minecraft@ns3366820:~/split_worlds/games/:</code>. Now, as you noticed, it took two commands to get to this point. These two commands can be shortened to one by using the command <code>cd /split_worlds/games/</code>. This is especially useful when you have to get deeply nested '''directories''' faster. But how do we get back to the main directory? Well little Joey, there are two simple ways. If we want to go from the '''games''' directory to the '''split_worlds''' directory, you can use the command <code>cd ..</code>. All this command does is brings you to the previous directory, so in this case you would be in the directory '''split_worlds'''. Now for command number two. The <code>cd</code>, without any directory name after it. This command will bring you back to the main directory. It is a very useful command when you're really nested deep in a directory, and you don't want to use <code>cd ..</code> a bunch of times.
  
 
=== Basic controls ===
 
=== Basic controls ===
Line 46: Line 46:
 
| '''Right Click''' || Copies and pastes text automatically.
 
| '''Right Click''' || Copies and pastes text automatically.
 
|}
 
|}
 +
 +
Moving on to part 2: [[Linux Tutorial- Part: 2]]

Latest revision as of 22:01, 6 May 2014

Navigating The Workspace

This tutorial will walk you through linux commands as if you managing a Minecraft server. For a list of relevant commands, see the Linux Command Reference. A list of commands used in this part of the tutorial will be posted at the end of the tutorial.

Assuming you have already set up an account on SASHA, (If not, see the Linux Tutorial- Part: 0.), the first command you will always use is ssh minecraft@localhost. There will be other cases where you will use other variations of this command, which I will go over later in this tutorial.

Once you input that command, you will be prompted to enter the password you made (Hopefully in part 0 of this tutorial. You now *should* be in the main minecraft directory. When you see the word directory, you mind should automatically convert the word to folder. They're essentially the same thing, and have the same functions. So, you're in the main directory, but how do you see everything that's in? Well little Joey, the answer is simple. Use the command ls to see absolutely everything in a directory. ls stands for list, as in list everything inside this folder. The colours of the files stand for different things (which I will glaze over in a bit), so don't be intimidated by them.

Now comes the guts of navigation, changing directories. As I mentioned before, every file on Linux is colored to represent different things. For example, a directory is blue, and a .jar file is red. Use ls to view the files in the directory, and look at which ones are coloured blue. Because you're inside the Minecraft directory, you should see the directory split_worlds. Alright, here comes the exciting part. Use the command cd split_worlds to go to the directory! Alright, it's not that exciting, but writing this tutorial is a bit dull and I need to entertain myself somehow. Anyways, the cd <directory name> command is probably the command you will use most in navigation, and it stands for change directory. As you may have noticed, the name of the directory you're in is shown write before the input (Where you type). If you use the command cd games, it should say minecraft@ns3366820:~/split_worlds/games/:. Now, as you noticed, it took two commands to get to this point. These two commands can be shortened to one by using the command cd /split_worlds/games/. This is especially useful when you have to get deeply nested directories faster. But how do we get back to the main directory? Well little Joey, there are two simple ways. If we want to go from the games directory to the split_worlds directory, you can use the command cd ... All this command does is brings you to the previous directory, so in this case you would be in the directory split_worlds. Now for command number two. The cd, without any directory name after it. This command will bring you back to the main directory. It is a very useful command when you're really nested deep in a directory, and you don't want to use cd .. a bunch of times.

Basic controls

Alright, lets step back a bit and take a look at the basic controls of PuTTY. There's not a huge amount, but they are incredibly useful. The first one is the repeat command control, or the up and down arrow keys. This will show all the previous commands you used, no matter how long ago. You have to experiment a bit to understand it fully, but it's incredibly useful once you get the hang of it. Now, here's the weird part about Linux that takes a bit of getting used to. When you highlight text in Linux, you don't have to use Ctrl + C like you do in Windows, all you have to do is Right click. The strange thing about right clicking, is that although it may copy, it also pastes text in the command/input line. This is especially useful later on when you have long file names like rEallYLongFilenamewithsTrangeVCAPps.zip, and you don't want to type it out again. It is incredibly important that you start learning to do it as soon as possible and not later, because there are some cases where Ctrl + C can can really cause trouble (Like in the server console, which I will go over in part X). And that's it! All the controls you will ever need to navigate PuTTY. I haven't found a case where you need to use anything else, but if I do I will post it here.

Command Explanation
ssh server@localhost Connects the the target server.
ls Lists all objects/files in the directory.
cd <directory> Moves you into target directory.
cd .. Returns you to previous directory.
cd Returns you to the main directory
Term Definition
Directory Folder.
ls List
cd Change directory.
Control Function
Up/Down Arrows Shows command history
Right Click Copies and pastes text automatically.

Moving on to part 2: Linux Tutorial- Part: 2