CSE Linux VM For Microsoft Windows Based on opensuse Leap 42.2 Dr. K. M. Flurchick February 2, 2017
Contents 1 Introduction 1 2 Requirements 1 3 Procedure 1 4 Usage 3 4.1 Start/Stop................................................. 3 4.2 Files.................................................... 4 4.3 Desktop Icons............................................... 4
1 Introduction CSE has created a Linux Virtual Machine (VM) for users learn Linux and to provide easier access to various Linux based remote systems such as the HPC system athena.ncat.edu or the midrange server prometheus.ncat.edu. The VM is based on Oracle VirtualBox version 5.12 software. The Linux VM can be installed on any system after VirtualBox is installed. The VM is based on opensuse LEAP42.2 with the KDE 5 Plasma desktop application. The initial appearance of the desktopn can easily be modified and the user can request additional alpplications to be installed. The VM system was built and configured on a Microsoft Windows 7 desktop computer and can be re-configured for the user s computer. The initial build used a computer with a 1TB hard drive, 8GB physical memory, 8-core Intel CPU and 128MB video memory. The virtual environment was configured as follows: 1. 60GB as a dynamically allocated virtual disk (this virtual disk can be resized). 2. 4GB physical memory maximum usage 3. 2-core committed for the virtual system 4. 1280x800 screen resolution 5. 64MB video memory The overall procedure to install consists of three parts: 1. Install and configure the VirtualBox software. 2. Copy the CSE Linux VM to the C:\Users\NCATuserid folder in the user s folder. Also create a folder name LinuxVM in the user folder. This will be shared between the Linux VM and the Microsoft Windows system. 3. Add the startvm icon to the desktop. Double-click the icon to start the CSE Linux VM. 2 Requirements The VM configuration requires: 1. Desktop or laptop computer Minimum of 60GB free disk space Minimum 4GB physical memory 2. Microsoft Windows OS (builtand tested using version 7) 3. VitrualBox from Oracle, Inc. 3 Procedure The procedure to install and configure the software: 1. Obtain the VirtualBox software for Windows Hosts and the Oracle VM VirtualBox Extension Pack from the website. https://www.virtualbox.org/wiki/downloads. (a) Install the VirtualBox software. (b) Launch the application. (c) From File Preferences install the Extension Pack (d) From Machine Settings General Advanced enter the following: Enable the Bidirectional option for the Shared Clipboard and Drag and Drop (e) From Machine Settings Shared Folder Machine Folder enter the following: Enter the full path for the LinuxVM folder created earlier on the Microsoft Windows system. 1
2. Download the zip file from the website http://coffee.ncat.edu:8080/flurchick/csehome/cselinuxvm/cse LinuxVM.zip This contains the folder Virtual VMs including: (a) Un-zip the file CSE LinuxVM.zip in the users folder (e.g. C:\Users\NCATuserid). This will create the folder Virtual VMs. This folder has three items: startvm.bat - a Microsoft Windows batch script to launce the virtual OS. startvm - the desktop icon which references the startvm.bat script. CSE LinuxVM - the Virtual Machine folder 2
4 Usage To use the CSE LinuxVM after the configuration is complete, double click the startvm icon already added to the desktop. This will launch VirtualBox and load the default VM. The system is configured for auto-logon so the Linux system comes up. The window can be resized but is designed for a display of 1280x800 resolution. 4.1 Start/Stop START THE VM: To start the Linux VM create a shortcut of the startvm icon (which is in the the folder Virtual VMs) and place it on the Microsoft Windows desktop. Double-click the icon. Note: the Linux VM does not require a logon (auto-logon). The default user is cseuser. EXIT THE VM: To exit the VM right-click in the background of the Linux window, select the Leave... option and the select Shutdown. This will turn off the Linux VM and exit the VirtualBox application. Note that if the folders are in different locations or have different names, the startvm.bat file must be edited as well. The Linux VM window does not use the full screen at this resolution to provide easy access to the Microsoft Windows system. This is how the VM appears: Figure 1: Logon screen for CSE Linux VM The desktop is setup with a default set of icons for some applications: Dolphin a file browser Kate a full screen text editor (similar to Microsoft Notepad) Firefox a web browser Mathematica 11 a full freatured Computer Algebra system LibreOffice an open source application similar to Microsoft Office Okular a PDF file viewer Konsole a Linux terminal window (The window on the left is a Konsole window) 3
Linux has a number of shortcuts built into the operating system 1. Single click on an icon to execute. 2. Double-click left mouse button or left click (and hold) to highlight test and copy to the Linux clipboard. Click the middle mouse button to paste. The system is configured to share the system clipboard, drag n drop operations and a folder accessible from both the Linux and Microsoft Windows system. This provies easy communication between the two operating systems. The shared clipboard work via CTRL C (or menu select copy) and CTRL V (or menu select paste). drag n drop operations are performed via mouse click and drag operations. The The desktop taskbar is set to auto-hide. To display the taskbar drag the mouse toward the bottom of the Linux window and it will pop-up. This is done to get additional window are and can be turned off. Figure 2: Taskbar Right click the icon to launch the application menu (similar to the Microsoft Application menu).... The KDE application allows for multiple virtual desktops to organize the work flow. These different desktops can be accessed by clicking on the particular desktop. This VM is configured with three virtual desktops. Each application started will have an entry on the task bar, such as the web browser Firefox and the terminal window Konsole. Note the... denotes any additional applications. The left side of the taskbar has system icons including the clock, the clipboard and so on. 4.2 Files The users home directory is \home\cseuser and the user has permission to create, delete or modify files in their home directory. To view the listing of files, use the GUI Dolphin or open a terminal window (Konsole) and enter the linux command ls (list files) or ls -a (list all files including hidden files) To access the Shared Folder change directory to mediasf LinuxVM (sf stands for shared folder). This can be done using the command cd /media/sf LinuxVM or using the file browser (Dolphin) select Root media sf LinuxVM 4.3 Desktop Icons The desktop is setup with a default set of icons for some applications: Dolphin a file browser Kate a full screen text editor (similar to Microsoft Notepad) Firefox a web browser Mathematica 11 a full freatured Computer Algebra system LibreOffice an open source application similar to Microsoft Office 4
Okular a PDF file viewer Konsole a Linux terminal window (The window on the left is a Konsole window) 5
UNIX & LINUX COMMAND REFERENCE GUIDE SEARCHING grep pattern file search for a pattern in file, will return each matching line find./ -name filename search the working directory structure for filename command grep pattern search output of command for pattern which command locate the full path of command ls directory listing ls -la FILE COMMANDS directory listing for hidden files cd change to $HOME pwd show current working directory mkdir dir create directory dir rm file delete file rm -r dir delete directory dir rm -rf dir cp file1 file2 force deletion of directory dir copy file1 to file2 cp r dir1 dir2 copy dir1 to dir2, will create dir2 if it does not exist mv file1 file2 moves file1 to file2if file2 is a directory file1 will be moved into file2 cat file display file to stdout less display file to stdout, but will allow backwards and forwards movement diff file1 file2 show the text differences between file1 and file2 ENVIRONMENT echo $SHELL display the value of the $SHELL environment variable module list, load, unload, and swap modules setenv, env, export set and display environment variables (varies with shell) dos2unix convert DOS file to UNIX format EDITORS vi, vim standard UNIX/Linux editors emacs powerful, customizable, but complicated text editor GETTING HELP man <command> display the manual page for a command man [section] <command> display the manual for a command in a specific section man k <keyword> based on keyword search the manuals command --help get usage information ssh user@host host as user REMOTE MACHINE INTERACTION connect to remote machine SYSTEM INTERACTION top show interactive system load and utilization uptime show system load and uptime ps show information on running processes on the system kill stop a process on the system REDIRECTION command1 command2 the pipe operator will chain the output of command1 to the input of command2 command tee file to screen and file splits output of command command < file redirect input from command to a file instead of standard input command > file redirect output from command to a file command >> file append output of command to file.
vi commands Basic shell commands i enter insert mode Esc exit insert mode /pattern search for pattern n repeat last search dd delete current line x delete current character Ctrl-f scroll forward 1 page Ctrl-b scroll back 1 page :w write out file :q quit :q! force quit :r myfile.txt insert file :42 jump to line 42 :%s/old/new/ find every instance of old and replace it with new man <command> ls cd rm mkdir rmdir env grep pattern <file> sed chown chmod diff export variable=value ps kill passwd less <file> cat <file> grep pattern <file> sort Display manual for command list files change working directory remove file make directory remove directory display environment variables print out lines from <file> with pattern stream editor change ownership of a file change permissions on a file display differences between 2 files set an environment variable list running processes kill a running process change your password page through contents of text file display the contents of <file> send STDOUT from grep command to the STDIN for the sort command Special characters: * Zero or more of any character? Any 1 character ~ home directory