Terminal
Anterior
Próximo

Terminal

Working at the command line is not as daunting a task as you would think. There is no special knowledge needed to use the command line as it is a program like everything else. Most things in Linux can be done using the command line. Although there are graphical tools for most programs, sometimes they are just not enough. This is where the command line comes in handy.

The terminal is often called the command prompt or the shell. In days gone by, this was the way the user interacted with the computer; however, Linux users have found that the use of the shell can be quicker than a graphical method and still holds some merit today. Here you will learn how to use the terminal.

The original use of the terminal was as a file browser, and indeed it is still used as a file browser. You can use the terminal as a file browser to navigate your files and undo the changes that have been made.

Iniciar a Consola

The Konsole can be started by choosing K-menu->System->Konsole (Terminal Program) from the Desktop menu system.

Comandos Comuns

Ver Directórios: -ls

O comando ls (LiSta) os ficheiros em cores diferentes com texto formatado

Criar Directórios: - mkdir (nome de directório)

O comando mkdir criará um directório (do inglês MaKeDIRectory)

Mudar de Directórios: - cd (/directório/localização)

The cd (Change Directory) command will change from your current directory to any directory you specify.

Copiar Ficheiros/Directórios: - cp (nome de ficheiro ou directório) (para nome de ficheiro ou directório)

O comando cp (do inglês CoPy) copiará quaisquer ficheiros que especificar. O comando cp -r copiará quaisquer directórios que especificar.

Remover Ficheiros/Directórios: - rm (nome de ficheiro ou directório)

The rm (ReMove) command will delete any filename you specify. The rm -r command will remove any directory you specify, and all its contents.

Move/Rename Files/Directories: - mv (file or directory name)

The mv (MoVe) command will move/rename any file or directory you specify.

Encontrar Ficheiros/Directórios: - locate (nome de ficheiro ou directório)

The locate command will search for any filename you specify. It uses an index of the files on your system to work quickly. To update this index, run the command sudo updatedb. This command is run automatically each day if you leave your computer on. It needs to be run with administrative privileges (see “Root e Sudo”).

You can also use wildcards to match one or more files, such as "*" (for all files) or "?" (to match one character).

Alterar para modo de Consola

The usual method of command-line access in Kubuntu is to start a terminal (see “Iniciar a Consola” above) , however sometimes it is useful to switch to the real console:

  1. Use as teclas de atalho Ctrl-Alt-F1 para mudar para a primeira consola.

  2. Para voltar ao ambiente de trabalho, utilize as teclas de atalho Ctrl-Alt-F7.

Nota

Existem seis consolas disponíveis. Cada uma delas é acessível através das seguintes teclas de atalho Ctrl-Alt-F1 até Ctrl-Alt-F6.

Desactivar o som beep no modo de Consola

  1. Start a Konsole session, select: K-menu->System->Konsole (Terminal Program) from the desktop menu system.

  2. Settings->Bell->None

Anterior
Próximo
Início