Solo disponible en BuenasTareas
  • Páginas : 33 (8009 palabras )
  • Descarga(s) : 0
  • Publicado : 17 de diciembre de 2010
Leer documento completo
Vista previa del texto
If you don’t like your default shell, simply type the name of the shell you want to try out temporarily. To change your shell permanently, use the usermod command. For example, to change your shell to the csh shell for the user named chris, type the following as root user from a shell:
# usermod -s /bin/csh chris

To find out information about your identity, use the id command as follows:

You can see information about your current login session by using the who command
$ who –uH

To find out what your current directory is, type the pwd command:
$ pwd

To find out the name of your home directory, type the echo command, followed by the $HOME variable:
$ echo $HOME
Instead of typing $HOME, you can use the tilde (~) to refer to your home directory. So,
to return to yourhome directory, you could simply type: cd ~

To list the contents of your home directory, either type the full path to your home directory, or use the ls command without a directory name. Using the -a option to ls enables you to view the hidden files (dot files) as well as all other files. With the -l option, you can see a long, detailed list of information on each file. (You can put multiplesingle-letter options together after a single dash, for example, -la.)
$ ls -la /home/chris

The most common utility for checking running processes is the ps command. Use it to see which programs are running, the resources they are using, and who is running them. Here’s an example of the ps command:
$ ps au

Many processes running on a computer are not associated with a terminal. A normal Linuxsystem has many processes running in the background. Background system processes perform such tasks as logging system activity or listening for data coming in from the network. They are often started when Linux boots up and run continuously until it shuts down. To page through all the processes running on your Linux system, add the pipe (|) and the less command to ps aux, like this:
$ ps aux |less

You’ve just seen a few commands that can help you quickly familiarize yourself with your Linux system. There are hundreds of other commands that you can try. You’ll find many in the /bin and /usr/bin directories, and you can use ls to see a irectory’s command list: ls /bin, for example, results in a list of commands in the /bin. Then use the man command (for example, man
hostname to seewhat each command does. Administrative commands are also in /sbin or /usr/sbin directories.
You can use the --help option with most commands to see the options and arguments that they support. For example, hostname --help.

Check the PATH—Type echo $PATH. You see a list of the directories containing commands that are immediately accessible to you. Listing the contents of those directoriesdisplays most standard Linux commands. Use the help command—Some commands are built into the shell, so they do not appear in a directory. The help command lists those commands and shows options available with each of them. (Type help | less to page through the list.) For help with a particular built-in command, type help command, replacing command with the name that interests you. The help command workswith the bash shell only
Use --help with the command—Many commands include a --help option that you can use to get information about how the command is used. For example, type date --help | less. The output shows not only options, but also time formats you can use with the date command.

Use the man command—To learn more about a particular command, type man command. (Replace command with thecommand name you want.) A description of the command and its options appears on the screen. Use the info command—The info command is another tool for displaying information about commands from the shell. The info command can move among a hierarchy of nodes to find information about commands and other items. Not all commands have information available in the info database, but sometimes more...
tracking img