SUSE Linux 10 for dummies phần 9
Số trang: 54
Loại file: pdf
Dung lượng: 1.29 MB
Lượt xem: 10
Lượt tải: 0
Xem trước 6 trang đầu tiên của tài liệu này:
Thông tin tài liệu:
Tham khảo tài liệu suse linux 10 for dummies phần 9, công nghệ thông tin, hệ điều hành phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả
Nội dung trích xuất từ tài liệu:
SUSE Linux 10 for dummies phần 9244 Part III: Doing Stuff with SUSE Chapter 16What’s a Shell and Why Do I Care?In This Chapter Opening terminal windows and virtual consoles Exploring the bash shell S ometimes things just don’t work. What do you do if the GUI desktop stops responding to your mouse clicks? What if the GUI doesn’t start at all? You can still tell your SUSE Linux system what to do, but you have to do it by typing commands into a text screen. In these situations, you work with the shell — the SUSE Linux command interpreter. I introduce the bash shell (the default shell in SUSE Linux) in this chapter. After you figure out how to work with the shell, you may even begin to like the simplicity and power of the Linux commands. And then, even if you’re a GUI aficionado, someday soon you may find yourself firing up a terminal window and making the system sing and dance with two- or three-letter com- mands strung together by strange punctuation characters. (Hey, I can dream, can’t I?)Opening Terminal Windowsand Virtual Consoles First things first. If you’re working in a GUI desktop such as GNOME or KDE, where do you type commands for the shell? Good question. The easiest way to get to the shell is to open a terminal (also called console) window. In KDE, click the icon that looks like a monitor covered by a seashell (for a shell, get it?) to open a terminal window. In GNOME, select Applications➪ System➪Terminal➪Gnome Terminal and that should open up a terminal window. Now you can type commands to your heart’s content.246 Part III: Doing Stuff with SUSE If, for some reason, the GUI seems to be hung (you click and type, but nothing happens), you can turn to the virtual consoles. (The physical console is the monitor-and-keyboard combination.) The idea of virtual consoles is to give you the ability to switch between several text consoles, even though you have only one physical console. Whether you are running a GUI or not, you can then use different text consoles to type different commands. To get to the first virtual console from the GNOME or KDE desktop, press Ctrl+Alt+F1. Press Ctrl+Alt+F2 for the second virtual console, and so on. Each of these virtual consoles is a text screen where you can log in and type Linux commands to perform various tasks. When you’re done, type exit to log out. You can use up to six virtual consoles. In most distributions, the seventh one is used for the GUI desktop. To get back to the GUI desktop, press Ctrl+Alt+F7. If the GUI appears to be hung, switch to a virtual console and gracefully shut down the system from that console. For example, press Ctrl+Alt+F2 and then log in as root. After that, type shutdown -h now to halt the system. To restart the system, type reboot. Exploring the Bash Shell If you’ve used MS-DOS, you may be familiar with COMMAND.COM, the DOS command interpreter. That program displays the infamous C:> prompt. In Windows, you can see this prompt if you open a command window. (To open a command window in Microsoft Windows, choose Start➪Run, type cmd in the text box, and then click OK.) SUSE Linux comes with a command interpreter that resembles COMMAND.COM in DOS, but it can do a whole lot more. The SUSE Linux command interpreter is called a shell. The default shell in SUSE Linux is bash. When you open a terminal window or log in at a text console, the bash shell is what prompts you for commands. Then, when you type a command, the shell executes your command. In addition to the standard Linux commands, bash can execute any com- puter program. So you can type the name of an application (the name is usually more cryptic than what you see in GNOME or KDE menus) at the shell prompt, and the shell starts that application. 247 Chapter 16: What’s a Shell and Why Do I Care?Understanding the syntaxof shell commandsBecause a shell interprets what you type, knowing how the shell processesthe text you enter is important. All shell commands have this general formatthat starts with a command followe ...
Nội dung trích xuất từ tài liệu:
SUSE Linux 10 for dummies phần 9244 Part III: Doing Stuff with SUSE Chapter 16What’s a Shell and Why Do I Care?In This Chapter Opening terminal windows and virtual consoles Exploring the bash shell S ometimes things just don’t work. What do you do if the GUI desktop stops responding to your mouse clicks? What if the GUI doesn’t start at all? You can still tell your SUSE Linux system what to do, but you have to do it by typing commands into a text screen. In these situations, you work with the shell — the SUSE Linux command interpreter. I introduce the bash shell (the default shell in SUSE Linux) in this chapter. After you figure out how to work with the shell, you may even begin to like the simplicity and power of the Linux commands. And then, even if you’re a GUI aficionado, someday soon you may find yourself firing up a terminal window and making the system sing and dance with two- or three-letter com- mands strung together by strange punctuation characters. (Hey, I can dream, can’t I?)Opening Terminal Windowsand Virtual Consoles First things first. If you’re working in a GUI desktop such as GNOME or KDE, where do you type commands for the shell? Good question. The easiest way to get to the shell is to open a terminal (also called console) window. In KDE, click the icon that looks like a monitor covered by a seashell (for a shell, get it?) to open a terminal window. In GNOME, select Applications➪ System➪Terminal➪Gnome Terminal and that should open up a terminal window. Now you can type commands to your heart’s content.246 Part III: Doing Stuff with SUSE If, for some reason, the GUI seems to be hung (you click and type, but nothing happens), you can turn to the virtual consoles. (The physical console is the monitor-and-keyboard combination.) The idea of virtual consoles is to give you the ability to switch between several text consoles, even though you have only one physical console. Whether you are running a GUI or not, you can then use different text consoles to type different commands. To get to the first virtual console from the GNOME or KDE desktop, press Ctrl+Alt+F1. Press Ctrl+Alt+F2 for the second virtual console, and so on. Each of these virtual consoles is a text screen where you can log in and type Linux commands to perform various tasks. When you’re done, type exit to log out. You can use up to six virtual consoles. In most distributions, the seventh one is used for the GUI desktop. To get back to the GUI desktop, press Ctrl+Alt+F7. If the GUI appears to be hung, switch to a virtual console and gracefully shut down the system from that console. For example, press Ctrl+Alt+F2 and then log in as root. After that, type shutdown -h now to halt the system. To restart the system, type reboot. Exploring the Bash Shell If you’ve used MS-DOS, you may be familiar with COMMAND.COM, the DOS command interpreter. That program displays the infamous C:> prompt. In Windows, you can see this prompt if you open a command window. (To open a command window in Microsoft Windows, choose Start➪Run, type cmd in the text box, and then click OK.) SUSE Linux comes with a command interpreter that resembles COMMAND.COM in DOS, but it can do a whole lot more. The SUSE Linux command interpreter is called a shell. The default shell in SUSE Linux is bash. When you open a terminal window or log in at a text console, the bash shell is what prompts you for commands. Then, when you type a command, the shell executes your command. In addition to the standard Linux commands, bash can execute any com- puter program. So you can type the name of an application (the name is usually more cryptic than what you see in GNOME or KDE menus) at the shell prompt, and the shell starts that application. 247 Chapter 16: What’s a Shell and Why Do I Care?Understanding the syntaxof shell commandsBecause a shell interprets what you type, knowing how the shell processesthe text you enter is important. All shell commands have this general formatthat starts with a command followe ...
Tìm kiếm theo từ khóa liên quan:
thủ thuật máy tính mẹo vặt máy tính kỹ thuật lập trình mẹo hay Linux tin học căn bản thủ thuật tin học tự học tin họcGợi ý tài liệu liên quan:
-
Top 10 mẹo 'đơn giản nhưng hữu ích' trong nhiếp ảnh
11 trang 314 0 0 -
Làm việc với Read Only Domain Controllers
20 trang 302 0 0 -
Kỹ thuật lập trình trên Visual Basic 2005
148 trang 264 0 0 -
Cách phân tích thiết kế hệ thống thông tin quan trọng phần 4
13 trang 216 0 0 -
Thủ thuật chặn web đen bằng phần mềm
10 trang 215 0 0 -
Sửa lỗi các chức năng quan trọng của Win với ReEnable 2.0 Portable Edition
5 trang 212 0 0 -
Xử lý tình trạng máy tính khởi động/tắt chậm
4 trang 211 0 0 -
Bài giảng điện tử môn tin học: Quản trị các hệ thống thông tin quản lý xuyên quốc gia
27 trang 211 0 0 -
Giáo trình Bảo trì hệ thống và cài đặt phần mềm
68 trang 207 0 0 -
NGÂN HÀNG CÂU HỎI TRẮC NGHIỆM THIẾT KẾ WEB
8 trang 206 0 0