Frequently Asked Questions - Unix-Linux

Connecting to and other unix servers with ssh from Linux

Open a Terminal window.  The instructions that follow are for Ubuntu Linux.  Other distributions are similar.

Click on the grid button in the lower left corner.

ubuntu search icon

Enter "Terminal" in the search dialog that appears.

ubuntu terminal command search window view

In the window that appears when you click on the Terminal icon shown above, enter "ssh -Y".  Substitue your cse user name for "username" in this command.  You can omit the "-Y" flag if you do not want to use ssh X forwarding (and if you don't know what this is, you can safely omit it).  The examples below use a user name of "sac".

ubuntu terminal secure shell connection initial system connection prompt

The first time that you connect to, or any other Linux/Unix server, a dialog like that shown above will appear.  Answer "yes" to this.

Then enter your cse password.

ubuntu terminal window showing successful secure shell connection to remote host

Back to top ↑

How to reset your MySQL password on

Resetting MySQL Password 

If you have forgotten your MySQL password, To reset the MySQL password go to Log in using your School of Computing (SoC) credentials and click the 'Reset MySQL Password' link. A new randomly generated password will be sent to you via email.

Changing MySQL Password from the MySQL CLI

If you know your old MySQL password, the password can be changed from MySQL workbench or from the MySQL command line interface (CLI). To chance your password from the CLI, connect to, run the mysql client, once connected, enter the following command at the mysql client prompt: 'set password=password('####');' and hit enter. Where '####' denotes the password you wish

Back to top ↑

Connecting to the Windows Terminal Server from Linux

The instructions that follow are for Ubuntu Linux.  Other Linux distributions are similar except for installing the "Remmina" program.

Click on the grid icon at the lower left of the screen.

ubuntu search icon

In the search dialog that appears enter "rdp".  The Remmina application should appear in the results.  Click on that icon.

ubuntu search window for Remmina application

In order to connect to our terminal server you need to add a customized connection.  Click on the green "+" symbol in the Remmina program and enter the following information:

Profile name: csnt-ts (or another name that you'd like to use).


User password: your cse password


Color depth: True color (24 bpp)

And then click the "Save" or "Save as Default" button.

Remote desktop settings window of Remmina application

Double click on the session you just saved.

Remmina session view

A dialog may appear asking you to accept a certificate for csnt-ts.  You should accept the certificate.

Remmina certificate acceptance window

Back to top ↑

Accessing using NoMachine - remote X11 GUI access.

NoMachine is a fast, multi protocol remote access client. Which allows RDP and X11 type connections to a variety of servers. We have a NX server installed on, which will allow GUI X11 access to Below are steps on setting up a noMachine connection to

You can download and installed noMachine from 

To configure a new connection, after you launch noMachine: 

  1. from the Recent connections pane,  click on ‘New’ 
  2. for Protocol select NX 
  3. In the Host input enter ‘’
  4. for Authentication method select Password
  5. select the Don’t use proxy radio button.
  6. Name your connection and finally click on Done

Once you have configured a connection to establish a connection:

  1. from the Recent connections pane,  double click on the named connection
  2. Enter your School of Computing (SoC) login credentials for the server (username and password)
  3. Double click on the Create a new virtual desktop  icon new virtual machine
  4. Click thru the next four dialogs that provide you an overview on using noMachine

Tip: You can save your password, the connection type, and click on Don’t show this message again on the dialogs for one-click connection to

Note: Please log off when you are done working on Simply disconnecting the NoMachine client will consume resources on the server and your session will be forcefully quit at somepoint, possibly resulting in loss of any unsaved data or settings.

Back to top ↑

Linux SMB Printing

The example provided depicts the GUI interfaces provided by the Ubuntu Linux 20.04 LTS distribution. Note: Printing only works when you connected to a University of Nebraska network.

Prior to setting up printing, you need to install some prerequisite programs.  This can be done with the command "sudo apt install python3-smbc smbclient" there will likely be a number of dependencies that also need to be installed when you issue this command.

  1. Open System Settings by clicking on the icons in the upper right corner and select "Settings".
    settings icon location
  2. Select Printers on the left and then click "Additional Printer Settings..."
    additional printer settings location
  3. Click on Add:
    add printer icon
  4. Select "Windows Printer via SAMBA"  Enter csnt/ and the name of the printer that you want to add such as "Avery-ps15" and select "Set authentication details now" and enter\username (where username is your CSE user name), enter your CSE credentials password in the Password: field and click Forward:
    credentials entry example
  5. Select Generic and click Forward on the next window:
    selecting generic on driver choice menu
  6. Select PostScript in the Drivers column of the next window and select Generic PostScript Printer Foomatic/Postscript [en] (Recommended) column and then click Forward:
    selecting postscript foomatic menu item
  7. Enter a short name for the printer, such as "ps15", and a "Human-readable" name for the printer such as "Avery-ps15" and then click Apply. The short name can be used later for command-line printing and the "Human-readable" name will show up in print applications that use the system's GUI.
    entering a name for a new printer
  8. You can click Cancel on the popup window or click Print Test Page. The test page will be deducted from your print quota if you choose to print it.
    test page menu page
  9. If everything worked as expected you should see the printer.
    system printer menu showing new printer

Linux Mint uses very much the same procedure except instead of being called "System Settings" the system configuration application is called "Control Center". Other Linux distributions are similar.

If you want to take advantage of more advanced printer features, such as duplexing or stapling, you can use a printer-specific driver for the printer models as seen at the bottom of Printing from Mac via SMB 10.8+ section of this FAQ

Back to top ↑

VMware Installation using D2L Brightspace

VMware Installation

Virtual machines services of the School of Computing (SoC) are provided by VMware through their IT Academy program. This service replaces our previous subscription service to VMware OnTheHub. Thus, users of VMware OnTheHub will be required to initiate a request for a new license through the VMware IT Academy program.  If you have a prior OnTheHub subscription and need a new IT Academy program license, contact .

Downloading VMware

You need to request a VMware account via the SoC account management utility: .  This will initiate an account request using your email address.  You should receive an email with a link by the next business day. Once you receive the email Click on the Link provided for download access.

vmware email example

The link leads to a login page:

vmware login page example

On the login page, select the 'Click here' link to create and complete registration:

vmware registration example

Check the "Do not ask me again for this application" box on the next page:

no not ask again prompt select example

On the next page, select the "Click Here to Redeem" button:

vmware redeem permission code for license

Click on the "Software Products and License Keys" Button presented on the next page:

license key issuance

The Left Column of the screen shows the steps to request the VMware software and obtain the 1-Year License Key. The right column contains the download links for your software. VM Workstation is for PC's and Vmware Fusion is for MAC.

At this point, you will install the downloaded VMware client and apply the license.

Back to top ↑

Code Development on the SoC Linux servers with Visual Studio Code

If you are trying to develop C or C++ code on the School of Computing's CSE server ( and using a Windows 10 PC or Mac, you may benefit from using Visual Studio Code ( (Links to an external site.)) as an editor.  While not as full-featured as a true IDE, VS Code does give you syntax and code error highlighting which can be beneficial. Note: To use VSCode on the CSE server, you must have the bash login shell selected. You can change or view your login shell using the AMU account management interface application.

After installing VS Code using the above link, you will need to install the SFTP extension.  Use the 'Preferences'  link from the VS Code menu to access the Extensions (Mac view:)

VS code SFTP extension install screen

VS Code will then open the left-panel showing the extensions.  Into the search window, enter 'ssh' to find the Remote - SSH extension and install it.

VS code ssh install screen 2

With Remote - SSH installed, you now need to modify the settings.json file with the configuration required for Remote - SSH. Press function key F1 and enter Preferences:json at the prompt:

VS code modify settings.json file

This opens an editor window.  This file dictates how Remote - SSH communicates with a remote.  Add the lines shown:

VS Code editor pane ssh communication settings

The "showLoginTerminal": true, option opens a shell prompt to the Linux host and is optional.

With these settings you can initiate a connection by clicking on the Remote Explorer icon and the connect to server icons, labeled 1 and 2  below:

VS code initiate a server connection

This causes a new window to open with a connection to the server.  The indication that you are connected can be seen in the lower left-corner.

VS Code connection established to cse server

Now you can Open a folder..., create a new file, or otherwise edit any file you have access to on the CSE server.

VS Code open folder and file on remote cse server

Compilation or execution of your source code can be done from within any 'ssh' session to the CSE server, including the login window displayed by Remote - SSH configuration setting with settings.json.  See the accompanying section on compilers and interpreters.

Shared SSH Keys

If you are frequently connecting to the CSE server, you can create a public/private SSH key-pair on your laptop or desktop system and "share" the public key with the CSE server. VSCode can then be configured to use the local SSH public/private keys when connecting to CSE and no longer needs a password because CSE knows your public SSH key, and thus grants access to your laptop or desktop.

Disk Usage Considerations

Frequently when using VS Code via Remote - SSH utilizes a large amount of disk space within your home directory on the CSE server. This disk usage is caused by two mechanisms; the server-side support for VS Code (VS Code Server) and VS Code extensions. Each of these VS Code-related actions can be the cause for CSE disk quotas to be exceeded. Determining where your disk usage is greatest can be done easily after logging into the CSE server by the command: du -hd1 which will show a list of all directories and the amount of disk space used in (B)ytes, (K)ilobytes, (M)egabytes, and (G)igabytes. How to determine where disk space is being used for VS Code and extensions is described below. If your primary disk space usage is not related to VS Code directories (.vscode and .vscode-server), or you still have disk quota issues despite clearing VS Code related files, contact us .

Extra Copies of VS Code Server

Using the Remote - SSH extension triggers the installation of a 100MB+ image of the VS Code Server into your home directory on the CSE server. Under certain conditions, you may have multiple copies of the VS Code Server application being placed in a subdirectory of your home directory. This may be related to; using a login shell other than 'bash', version updates to VS Code Server, or as an undocumented artifact of how VS Code behavior. These old/extra copies count against your disk quota on the CSE server, and may result in you receiving disk quota exceeded emails from CSE Systems Support. These old/extra copies can safely be removed, an easy way to tell is if the date reported by 'ls -lt' is the most recent, that is the copy to keep. All older copies can be safely removed.

Example, below is an example of what you will find in the VS Code Server directory and how to remove it:

wmotycka@cse:~> ls -lt ~/.vscode-server/bin/
total 12
drwxr-xr-x 6 wmotycka staff 4096 Oct 26 07:54 d2e414d9e4239a252d1ab117bd7067f125afd80a  # NOTE OLDEST DATE
drwxr-xr-x 6 wmotycka staff 4096 Nov  8 09:00 fcac248b077b55bae4ba5bab613fd6e9156c2f0c    # NOTE OLD DATE
drwxr-xr-x 6 wmotycka staff 4096 Jan 16 08:55 ea3859d4ba2f3e577a159bc91e3074c5d85c0523
wmotycka@cse:~> cd ~/.vscode-server/bin
# This is the size used by all the copies of VS Code server
wmotycka@cse:~/.vscode-server/bin> du -hs
317M    .
# Here are the specifics of how much disk space each copy of VS Code server is using
wmotycka@cse:~/.vscode-server/bin> du -hd1
112M    ./d2e414d9e4239a252d1ab117bd7067f125afd80a
104M    ./ea3859d4ba2f3e577a159bc91e3074c5d85c0523
103M    ./fcac248b077b55bae4ba5bab613fd6e9156c2f0c
317M    .
wmotycka@cse:~/.vscode-server/bin> cd ../..
wmotycka@cse:~> # Remove the extra/oldest copy/copies of the VS Code Server using 'rm -r'
wmotycka@cse:~> rm -r ~/.vscode-server/bin/d2e414d9e4239a252d1ab117bd7067f125afd80a
wmotycka@cse:~> rm -r ~/.vscode-server/bin/fcac248b077b55bae4ba5bab613fd6e9156c2f0c

The last two commands above remove the oldest copies of VS Code Server images while retaining the most recently dated copy present.

Server Installed VS Code Server Extensions

Where you install VS Code extensions is also important. Extensions stored on the server can use a lot of disk space, and also count against your quota. To add to the pain, VS Code Server seems to build a cached copy of the extensions installed on the server, with a near doubling of used disk space. Further, after uninstalling the extension using the VS Code client, the extensions on server persist. It is recommended that you should avoid installing extensions on the server unless necessary. If you install and uninstall extensions, ensure that they are removed from your ~/.vscode-server/extensions directory on the CSE server.

An example of where extensions are the cause of CSE server disk space utilization can be seen below. All extra copies of VS Code Server were removed, yet the disk space usage for VS Code Server is still over 500 MB. We note from the output of the du command below that the space is being used within ~/.vscode-server/extensions, using 440MB of storage. Deeper examination within the extensions subdirectory reveals that the largest disk space consumer is the tabnine-tabnine-vscode-3.2.6 extension. In this case, the user had uninstalled this extension from VS Code using the client, but VS Code Server apparently doesn't remove them from disk once installed.

wmotycka@cse:~> du -hd1 .vscode-server/
104M	.vscode-server/bin
241M	.vscode-server/data
440M	.vscode-server/extensions
784M	.vscode-server/
wmotycka@cse:~> du -hd1 .vscode-server/extensions/
8.0K	.vscode-server/extensions/ms-vscode.cpptools-1.1.0-insiders3
2.0M	.vscode-server/extensions/formulahendry.code-runner-0.11.2
59M	.vscode-server/extensions/ms-vscode.cpptools-1.2.0
312K	.vscode-server/extensions/albert.tabout-0.2.0
9.0M	.vscode-server/extensions/joeberria.statusbarerror-0.4.0
299M	.vscode-server/extensions/tabnine.tabnine-vscode-3.2.6
16M	.vscode-server/extensions/streetsidesoftware.code-spell-checker-1.10.2
19M	.vscode-server/extensions/esbenp.prettier-vscode-5.8.0
36M	.vscode-server/extensions/visualstudioexptteam.vscodeintellicode-1.2.11
996K	.vscode-server/extensions/gruntfuggly.todo-tree-0.0.196
640K	.vscode-server/extensions/austin.code-gnu-global-0.2.2
440M	.vscode-server/extensions/
wmotycka@cse:~> ls -dl .vscode-server/extensions/tabnine.tabnine-vscode-3.2.6
drwxr-xr-x 6 wmotycka ugrad 4096 Feb  4 08:54 .vscode-server/extensions/tabnine.tabnine-vscode-3.2.6
wmotycka@cse:~> rm -r .vscode-server/extensions/tabnine.tabnine-vscode-3.2.6

Back to top ↑

How to Format Your Thesis Using LaTeX

The Office of Graduate Studies dictates the style and format for a thesis at the University of Nebraska-Lincoln. Information about these standards can be found on their website for current students at, and specifically in a publication titled "Guidebook For Preparation and Submission of a Thesis". 

The Department of Mathematics maintains a LaTex class file that helps format your thesis to Nebraska's guidelines. This template may be helpful to Computer Science and Engineering students as well. Look for the "NU Thesis LaTeX Class File" under the Resources section of this page:

Back to top ↑

Compilers and Interpreters available on


gcc GNU CcCompiler
g++ GNU C++ compiler
javac Java compiler
gfortran GNU Fortran compiler
clisp Common Lisp
alisp Allegro Common Lisp


perl Perl command line scripting language
php Command line and web scripting language
ruby Command line and web scripting language
pyton Command line scripting language

Back to top ↑

A simple unix text editor - pico

To use pico, type "pico filename" where filename is the file you with to create or edit. Once in pico, you will see a list of pico commands you can use, shown on the bottom of the screen. The '^' symbols means <CTRL>. To view the pico help screen the command shown on the bottom of the screen is "^G" which means <CTRL>-G.

Back to top ↑

Basic Unix Commands

Note on systax used in document:
items in [] are optional
items in {} can be repeated 0 or more times.
fn = filename (possible with wildcards)
dir = directory name

File System:

cat fn {fn}
concatenate, can be used to display a file.
more fn {fn}
displays file(s) one screenful, at a time. At MORE prompt enter: space bar - for next screenful <cr> - for next line, q - to quit more command.
cp fn1 fn2
copy file - fn1 to fn2, fn1 remains.
mv fn1 fn2
move (rename) file - fn1 to fn2, fn1 no longer exists.
rm fn
remove (delete) file.
lpr -Pprinter_name fn
print a file, printer_name = ps16 or ps17.
ls [fn]
list files in current directory option filename is usually used to display files matching wildcards. (ie. ls *.s will list all assembly language source files.)
ls -lgRa
Recursive listing of all files within all subdirectories. Longest, most descriptive format.
cd [dir]
change working directory, ``home directory" if not specified. cd .. will backup one level in the directory structure.
print working directory path.
mkdir dir
make a new directory, giving it the name dir (within the current directory)
rmdir dir
remove (delete) the directory named dir (the directory must be empty)
file fn
Tries to determine what kind of information is in a file by consulting the file system index and by reading the file itself.
Prints a summary of total space occupied by all files in a hierarchy.
sort fn
Sorts ASCII files line-by-line.
Change file permissions. See the man pages for a complete description of settings. Use this command to determine whether files can be readable by other people.
find . -name filename
In it's most simple form find will display all files in this and any subdirectories which name matches filename. See the man page for find for a complete description of this command. Find can be use to find files matching name patters, dates, owners, sizes, etc. and to perform action on matched files.
gzip fn
Use this to compress files not needed immediately to conserve disk space. A ``.gz" will be appended to the filename.
gzip -d
Uncompresses files with ``.Z" at end of filename.
head {-n} fn
Prints first n lines of a text file. If no number is specified, the default is 10.
tail {-n} fn
Prints last n lines of a text file. If no number is specified, the default is 10.
tail {-n} fn
Prints last n lines of a text file. If no number is specified, the default is 10.
grep string fn
Print occurrences of string in file

Remote Connection:

ssh remote_host
Launch a secure shell to the remote host specified.


list users currently on the system.
list users currently on the system.
what, similar to who but includes what they are doing.
Email message utility.
pine username
will send Email to username.
talk username
allows two users to have an interactive conversation over the computer.
write username
allows a user to put a message on another users screen.
mesg n
Makes it so other users cannot interrupt you with talk requests, and write messages.


man command
manual, returns the manual for the given command from the UNIX on-line manual. If you cannot find a man page for a command, there may be one in a directory that isn't in your MANPATH. Your MANPATH is setup in the .login file and a command's man page is usually in a man directory off the same parent directory as the command. For example, if the command is located in /usr/local/bin, its man page is probably in /usr/local/man.
man -k keyword
display manual headings containing the word keyword.


alias name def
Assigns ``def'' to the alias ``name''. Usually found in the .cshrc file. For example ``alias dir ls -la''.
Clears screen.
List history of commands used.
re-execute the last command entered.
re-execute the last command that started with the given letter, eg !c will re-execute the last command that began with the letter c.
jobs -l
list all currently stopped or background jobs with job numbers and process ID's.
kill [-signal] %jobnumber
kill the given job number. Use the "jobs" command to show running jobs. You might need to kill a job to logout if you have accidentally put a job into the background or stopped a job. Use -TERM or -KILL singlas to force quite jobs.

kill PID
kill the given Process. refer the "ps" command to find running processes. Use -TERM or -KILL singlas to force quite jobs.
ps -fa
list all your current processes. See the man page for a full description.
kill the current process - the one in the  foreground
suspend foreground process.
put a suspended job in the background.
put a suspended or background job in the foreground.
display time and date.

To find out about more commands, click  here.

Back to top ↑

Editing a File on Unix with vi - Basic Commands.

What is  vi?

The default editor that comes with the UNIX operating system is called  vi ( visual editor). [Alternate editors for UNIX environments include  pico and  emacs, a product of GNU.]

The UNIX  vi editor is a full screen editor and has two modes of operation:

  1. Command mode commands which cause action to be taken on the file, and
  2. Insert mode in which entered text is inserted into the file.

In the command mode, every character typed is a command that does something to the text file being edited; a character typed in the command mode may even cause the  vi editor to enter the insert mode. In the insert mode, every character typed is added to the text in the file; pressing the  <Esc> ( Escape) key turns off the Insert mode.

While there are a number of  vi commands, just a handful of these is usually sufficient for beginning  vi users. To assist such users, this Web page contains a sampling of basic  vi commands. The most basic and useful commands are marked with an asterisk ( * or star) in the tables below. With practice, these commands should become automatic.

NOTE: Both UNIX and  vi are  case-sensitive. Be sure not to use a capital letter in place of a lowercase letter; the results will not be what you expect.

To Get Into and Out Of  vi

To Start  vi

To use  vi on a file, type in  vi filename. If the file named  filename exists, then the first page (or screen) of the file will be displayed; if the file does not exist, then an empty file and screen are created into which you may enter text.

* vi filename edit  filename starting at line 1
  vi -r filename recover  filename that was being edited when system crashed

To Exit  vi

Usually the new or modified file is saved when you leave  vi. However, it is also possible to quit  vi without saving the file.

Note: The cursor moves to bottom of screen whenever a colon ( :) is typed. This type of command is completed by hitting the  <Return> (or  <Enter>) key.

Basic Command Command Description
here :x <Return> quit  vi, writing out modified file to file named in original invocation
  :wq <Return> quit  vi, writing out modified file to file named in original invocation
  :q <Return> quit (or exit)  vi
 *  :q! <Return> quit  vi even though latest changes have not been saved for this  vi call

Moving the Cursor

Unlike many of the PC and MacIntosh editors,  the mouse does not move the cursor within the  vi editor screen (or window). You must use the the key commands listed below. On some UNIX platforms, the arrow keys may be used as well; however, since  vi was designed with the Qwerty keyboard (containing no arrow keys) in mind, the arrow keys sometimes produce strange effects in  vi and should be avoided.

If you go back and forth between a PC environment and a UNIX environment, you may find that this dissimilarity in methods for cursor movement is the most frustrating difference between the two.

In the table below, the symbol  ^ before a letter means that the  <Ctrl> key should be held down while the letter key is pressed.

Basic Command Command Description
* j  or  <Return>   [ or down-arrow] move cursor down one line
* k [ or up-arrow] move cursor up one line
* h  or  <Backspace>   [ or left-arrow] move cursor left one character
* l  or  <Space>   [ or right-arrow] move cursor right one character
* 0 (zero) move cursor to start of current line (the one with the cursor)
* $ move cursor to end of current line
  w move cursor to beginning of next word
  b move cursor back to beginning of preceding word
  :0 <Return>  or 1G move cursor to first line in file
  :n <Return>  or nG move cursor to line  n
  :$ <Return>  or G move cursor to last line in file

Screen Manipulation

The following commands allow the  vi editor screen (or window) to move up or down several lines and to be refreshed.

Basic Command Command Description
  ^f move forward one screen
  ^b move backward one screen
  ^d move down (forward) one half screen
  ^u move up (back) one half screen
  ^l redraws the screen
  ^r redraws the screen, removing deleted lines

Adding, Changing, and Deleting Text

Unlike PC editors, you cannot replace or delete text by highlighting it with the mouse. Instead use the commands in the following tables.

Perhaps the most important command is the one that allows you to back up and  undo your last action. Unfortunately, this command acts like a toggle, undoing and redoing your most recent action. You cannot go back more than one step.

* u UNDO WHATEVER YOU JUST DID; a simple toggle

The main purpose of an editor is to create, add, or modify text for a file.

Inserting or Adding Text

The following commands allow you to insert and add text. Each of these commands puts the  vi editor into insert mode; thus, the  <Esc> key must be pressed to terminate the entry of text and to put the  vi editor back into command mode.

Basic Command Command Description
* i insert text before cursor, until  <Esc> hit
  I insert text at beginning of current line, until  <Esc> hit
* a append text after cursor, until  <Esc> hit
  A append text to end of current line, until  <Esc> hit
* o open and put text in a new line below current line, until  <Esc> hit
* O open and put text in a new line above current line, until  <Esc> hit

Changing Text

The following commands allow you to modify text.

Basic Command Command Description
* r replace single character under cursor (no  <Esc> needed)
  R replace characters, starting with current cursor position, until  <Esc> hit
  cw change the current word with new text, starting with the character under cursor, until  <Esc> hit
  cNw change  N words beginning with character under cursor, until  <Esc> hit;   e.g.,  c5w changes 5 words
  C change (replace) the characters in the current line, until  <Esc> hit
  cc change (replace) the entire current line, stopping when  <Esc> is hit
  Ncc  or  cNc change (replace) the next N lines, starting with the current line, stopping when  <Esc> is hit

Deleting Text

The following commands allow you to delete text.

Basic Command Command Description
* x delete single character under cursor
  Nx delete N characters, starting with character under cursor
  dw delete the single word beginning with character under cursor
  dNw delete  N words beginning with character under cursor;   e.g.,  d5w deletes 5 words
  D delete the remainder of the line, starting with current cursor position
* dd delete entire current line
  Ndd  or  dNd delete  N lines, beginning with the current line;   e.g.,  5dd deletes 5 lines

Cutting and Pasting Text

The following commands allow you to copy and paste text.

Basic Command Command Description
  yy copy (yank, cut) the current line into the buffer
  Nyy  or  yNy copy (yank, cut) the next N lines, including the current line, into the buffer
  p put (paste) the line(s) in the buffer into the text after the current line

Other Commands

Searching Text

A common occurrence in text editing is to replace one word or phase by another. To locate instances of particular sets of characters (or strings), use the following commands.

Basic Command Command Description
  /string search forward for occurrence of  string in text
  ?string search backward for occurrence of  string in text
  n move to next occurrence of search string
  N move to next occurrence of search string in opposite direction

Determining Line Numbers

Being able to determine the line number of the current line or the total number of lines in the file being edited is sometimes useful.

Basic Command Command Description
  :.= returns line number of current line at bottom of screen
  := returns the total number of lines at bottom of screen
  ^g provides the current line number, along with the total number of lines, In the file at the bottom of the screen

Saving and Reading Files

These commands permit you to input and output files other than the named file with which you are currently working.

Basic Command Command Description
  :r filename <Return> read file named  filename and insert after current line (the line with cursor)
  :w <Return> write current contents to file named in original  vi call
  :w newfile <Return> write current contents to a new file named  newfile
  :12,35w smallfile <Return> write the contents of the lines numbered 12 through 35 to a new file named  smallfile
  :w! prevfile <Return> write current contents over a pre-existing file named  prevfile

Back to top ↑

MySQL Database Account - Requesting & Connecting

MySQL is the general purpose database subsystem provided by the School of Computing (SoC) for student use. Each user is allowed one database. This database is automatically created after requested by a user and is named the same as your SoC systems username. Users can create as many tables as they want but we ask that they keep all databases to a reasonable size.

Requesting a MySQL Account and Database
Any user with a SoC account can request access to the MySQL server running on the server. To do so, log in to the SoC Account Management Utility (AMU) page at with your CSE account credentials. Once you log in, click the Account Settings link on the left page. From there, check the box for MySQL Account and then click Save. You should then receive an email message with your MySQL account credentials.

Connecting to MySQL Database
To connect to a MySQL database from the command-line on, type 'mysql -p' and hit enter. The password you will be prompted for will be your MySQL password, which is different from your SoC password.

To connect to a MySQL database from the command-line from another computer with the mysql command line client installed. Run 'mysql -h -u YOUR_SoC_LOGIN -p' and hit enter. Note: the password you will be prompted for will be your MySQL password, which is different from your SoC password. MySQL passwords can be reset using the SoC Account Management Utility page.

Back to top ↑