Now that you’re logged in, the first thing you’ll want to do is inspect what is going on and how the system is configured. To do that, you need to list files and directories, and move around within the filesystem. This chapter covers these basics.
Some command prompts are set to show the current directory path. Others
are not, and it can be tough to remember where you are in the filesystem. The
pwd (print working directory) command shows you:
bash-4.2$ pwd /etc/init.d
Unlike in Windows, which is case-insensitive (but case-aware),
in Bash and in Linux in general, case matters. By convention, most
Linux commands are lowercase. If you try to type in an uppercase
you will get a Command Not Found error.
In Bash, the
ls (list) command is used to show directories and
files. It is similar to the
DIR command in Windows Command Prompt.
Figure 2-1 shows a simple sample of an
ssh sessions use color highlighting, as shown in these
screenshots (in this case, green means the file is executable). Some do
not. So don’t be surprised if you see colors!
To see a more detailed listing of the files and directories, you can use
ls -l command, as shown in Figure 2-2.