UNIX/LINUX using a terminal connection
Servers may be using either UNIX or LINUX, but the commands for both operating systems are essentially the same. So, if we learn the commands and behaviors for one, we probably can work easily on the other as well. For the rest of this page, where the word UNIX is used, you can substitute LINUX as well.
A little knowledge is a dangerous thing. This is especially true of UNIX. In UNIX it is possible to erase every one of your files with one little command and never get an "Are you sure?" message or warning.
Ask me.
I've done it.
And while I've done it to my own files, some network managers have done it to every user's files.
are we really using UNIX? connecting home directory conventions navigating literacy
For Macintosh machines, you will be using an SSH client that comes with every Apple computer (although you might not have known about it).
SSH uses ssh (the Secure Shell) to login, so that your username and password are not visible to other people on the campus network.
are we really using UNIX? connecting home directory conventions navigating literacy
are we really using UNIX? connecting home directory conventions navigating literacy
If you want reference sheet for Unix/Linux commands,
you may use and save this one.
This would be a good time to get used to a convention.
commandsargumentvalue
Working with Unix/Linux at the command line requires us to know certain exact commands.
But we also want to become comfortable with the fact that some commands require an argument to effectively carry out the command.
And, sometimes the argument will include a specific value that must be appended to the argument in order to carry out the command.
We will have to get used to this syntax as it will be a common theme in all the tools we will encounter.
are we really using UNIX? connecting home directory conventions navigating literacy
As you move around among your files and directories, you may become disoriented as to "where" you are. UNIX has the concept of "current" directory, also known as the working directory, or the directory you are currently "in". Two additional commands will be useful to determine what directory you are in.
pwd - the print working directory command
pwd doesn't take any arguments
cd - the change directory command
cd takes the destination directory as its single argument.
Do you see that you changed to a new directory?
Type cd to return home.
More on ls (that's "ell ess", not "one ess"):
ls -l gives a long directory listing, including the file size, creation date, and access permissions
ls -s gives the size (in blocks) of a file
ls -a shows all files.
Otherwise, files starting with a dot ( . ) are skipped.
Your current directory is always abbreviated as . ,
and the parent directory is always abbreviated as ..
You can put more than one argument on the ls command, as in ls -als
are we really using UNIX? connecting home directory conventions navigating literacy
These are commands commonly used. You will find them valuable when you work within a UNIX system, and for other UNIX tasks as well. Remember: UNIX is case-sensitive
Commands can have arguments and options. Options usually have a hyphen.
Most common errors in UNIX come from not knowing what directory you are in. Use the pwd and ls commands to keep track.
Use the man command to get usage information
are we really using UNIX? connecting home directory conventions navigating literacy
Copyright © R.E. Bergquist 2014- | Last Updated on | Powered by w3.css