- Getting a Linux Machine Up and Running
- Updating the VMWare Linux Instance
- Are You a Linux Guru?
- Conclusion
Are You a Linux Guru?
I'm often struck when an IT administrator or Linux guru is installing or configuring software on my machine. I usually just respectfully lean out of the way and let them do their thing. The latter normally consists of running a large number of arcane commands similar to the above. I've come to think that it's important to try to do such things for myself—this is what moving up the value chain is all about. A key part of this is asking questions and taking good notes. This whole area of moving up the value chain is covered in great detail in my recent book. (There's also an Amazon Short on the topic.)
Enough self-promotion—let's get those tools downloaded installed!
Getting Tooled Up—WinSCP and PuTTY
The first tool you'll need is WinSCP. I used the latest version at the time of writing: WinSCP 4.1 beta release. During the installation of WinSCP, you'll be prompted for the type of installation you want. The two options are Norton Commander or Windows Explorer. I opted for the former, but you can choose whichever you like.
The next item to download is putty.exe, available from: http://www.chiark.greenend.org.uk. Again, just follow the installation defaults and you'll be ready to start using the tools.
Opening a Window into the Linux File System with WinSCP
If you're using Windows, then you can start WinSCP by pressing the Start button and finding and running the WinSCP program. The first time you run WinSCP, you may see a dialog similar to that illustrated in Figure 2.
Figure 2 SSH warning dialog.
Just click Yes to add the host key to the cache. This enables a secure session to be initiated between the client (your Windows machine) and the server (your VMWare Linux image). If all is well, you should see the WinSCP login screen as illustrated in Figure 3.
Figure 3 The WinSCP login screen.
Notice that I've entered the required details for successfully creating a session with the VMWare image. Naturally, your IP address will most likely be different. The IP address I used in Figure 3 is the one taken from Figure 1.
Also in Figure 3 are the root user (i.e., notroot) and the usual root password (i.e., thoughtpolice). Before actually logging into the Linux machine, you can opt to save the settings in Figure 3. This is useful because it saves you having to re-enter the details the next time you want to connect. Any stored settings are then recorded in the top-left side of Figure 3 in the Session->Stored sessions folder. The next time you use WinSCP, you'll see all recorded sessions listed for selection.
After you click the Login button in Figure 3, you should then see the main WinSCP screen as illustrated in Figure 4.
Figure 4 The main WinSCP screen.
The left side of Figure 4 illustrates your local disk and the right side is the file system in the VMWare Linux image. In effect, Figure 4 is your window into two operating systems—pretty powerful stuff for Linux newbies (I include myself in the latter!).
The interface in Figure 4 is fairly familiar territory for Windows users. Let's now say you want to create a new folder in the Linux machine. This is achieved by right-clicking in the right-hand side of Figure 4 as illustrated in Figure 5.
Figure 5 Creating a new Linux directory.
Once you select the Directory option in Figure 5, you can create the required directory. Figure 6 illustrates a new directory called "My new Linux folder".
Figure 6 A new Linux folder.
You can now copy files into and out of the new Linux directory. The procedure for doing this is ever so slightly counter-intuitive. You open the folder that contains the required file on the left side of Figure 6. Next, select the required file and press F5. You're then prompted for the destination—in this case, the newly created Linux directory. Click the Copy button and the file will magically appear inside your new Linux directory. You're now using Linux to store your Windows files. Obviously, the same can be done in reverse.
Opening a Terminal Window into the Linux Machine with PuTTY
Now, we move onto the other Linux tool of interest: PuTTY.
If you need to run some commands inside the Linux image, you can do it in at least two ways. The first is by selecting the VMWare Player screen and directing your commands into the image. Referring to Figure 1, you click the window and then press Ctrl+G. This key combination then sets the focus in the VMWare Player window, and you can then type shell commands until you want to return to Windows. Getting back to Windows is achieved by pressing Ctrl+Alt.
There's another way to enter commands and that involves using PuTTY. Let's look at an example. I downloaded just the PuTTY executable; if you do the same, you can create a desktop shortcut for it and then just double-click that to start PuTTY. The main login screen is illustrated in Figure 7.
Figure 7 The PuTTY login screen.
It's likely that the first time you start PuTTY, you'll see the same issue we observed with WinSCP. This is illustrated in Figure 8, and you can safely click Yes to access the main PuTTY screen, as illustrated in Figure 9.
Figure 8 PuTTY secure login.
In Figure 9, we see the main PuTTY screen, which just prompts for you to log in. The login prompt in Figure 9 is a Linux login.
Figure 9 The main PuTTY screen.
Let's log in as usual with the notroot account as illustrated in Figure 10.
Figure 10 Logging into and using PuTTY.
Notice in Figure 10 that I've run a few Linux commands, namely pwd and ls. You can even see the newly created folder "My new Linux folder" listed in Figure 10.