- Fun with the Linux Command Line
- Steps 1-3
1) GETTING STARTED
When Terminal opens, you'll see a prompt: username@computername, followed by -$, which lets you know that it is in fact a prompt. As a starting point, type pwd and press Enter (everything requires the Enter key, so I'll stop mentioning it). Terminal returns the name of the directory you're currently in (the working directory). To change directories, type cd directory-name, or cd .. to move up one level, or cd / to move to the top directory. Linux file and directory names are case sensitive.
Once inside a directory, type dir or ls (short for "list") to see the files and subdirectories inside that directory. The ls command has the benefit of providing colors to help you distinguish files (default is purple) from directories (blue). Black means a text file, light blue signifies a symbolic link (a shortcut), green is an executable file. For a complete look at the contents, use ls -l to get full file/directory details (note that Linux uses the forward slash (/) as a separator, not the backslash (\). To have Linux tell you what kind of file an item in the list is, type file followed by the name of the item.
2) LOOKING AROUND
The ls -l command reveals the details of what's inside the directory. Column titles would be spiffy, but in their absence, from left to right, they mean the following: file permissions, owner, group, size in bytes, time last modified, and file or directory name. In a future Linux solution we'll look at file permissions and ownership.
3) FINDING INFORMATION
The file commands at the bottom of this screen provide information on file type for the designated item. Since Linux does not use standard file extensions, it's often impossible to tell what a file might be simply by looking at it.