User Tools

Site Tools


howto:unix_shell

This is an old revision of the document!


How do I use a Linux Command-line Interface?

This page is for you if you are getting access to a Linux server and you need to learn how to use the command-line interface to use the server.

1. Obtaining software

Step one is to obtain some terminal software. If you are on a Linux or a Mac computer, you already have this! Look for your Terminal application. But if you are on a Windows PC, you'll need to install either an SSH client, or a terminal emulator. You have a couple options, but I recommend sticking with just the first one:

  1. Install Cygwin - this is a much more advanced option, not recommended for the faint of heart as it installs a linux emulation layer on top of Windows and requires selection of desired packages to be installed.
  2. Install the Microsoft "Bash on Windows" subsystem for linux - this might be appropriate if you want a more officially supported linux emulation layer on top of Windows. If you are curious, this installs a debian-like linux distro, complete with “apt” to install desired packages.

2. Open the terminal or connect to the remote linux server

If you installed either options 2. Cygwin or 3. Bash on Windows above, then you can practice these commands on your local computer. If you are on a Linux or Mac computer, you can also practice on your local computer.

  • Open the terminal application to get started
    1. If you want to connect to a remote linux system using SSH, you can do so with a command like this:
      ssh <username>@<servername>
      #for example: ssh jnilsson@nexus.ss.uci.edu

Or, if you installed PuTTY.exe or another SSH client program, you will need to connect to the remote linux server.

  • Open PuTTY and enter the hostname of the server, optionally set any connection options you need, then click on Open. It will prompt you for your username and password, but when you type the password, it will not print anything to the screen. This is normal.

3. Run through a tutorial

There is a great resource available online. Please keep your terminal open side by side with a browser window and run through the tutorial here:

4. Important commands to know

Here are the most important commands to make sure you are familiar with:

  • passwd - use this to change your password. If you have not done this yet, do it now!
  • pwd
  • ls
  • cd
  • mkdir
  • rmdir
  • mv
  • rm - be very careful with this! It might not ask you to confirm before deleting a file
  • text editor: vim, emacs, or nano
  • cat
  • less or more
  • grep
howto/unix_shell.1541698774.txt.gz · Last modified: 2018/11/08 17:39 by jnilsson