zoukankan      html  css  js  c++  java
  • Linux Command Line Basics

    Most of this note comes from the Beginning the Linux Command Line, Second Edition by Sander van Vugt


    The only reason why many administrators are using a graphical interface on Linux, is because it allows them to run many terminal windows simultaneously, which makes it easy to read the documentation in one window, configure in another window and test the configuration in a third window for instance.

    Managing Bash with Key Sequences

    • Ctrl+C: Use this key sequence to quit a command that is not responding (or simply takes too long to complete). In General, Ctrl+C is also a good choice if you absolutely don't have a clue as to what's happening, and you just want to terminate the command that's running in your shell. If used in the shell itself, it will close the shell as well (?).

    • Ctrl+D: This key sequence is used to send the "end of file" (EOF) signal to a command. Use this when the command is waiting for more input, which is indicated by the secondary prompt (>). You can also use this key sequence to close a shell session.

    • Ctrl+R: This is the reversed search feature. It will open the "reversed I-search" prompt, which helps you locate commands that you used previously. This Ctrl+R key sequence searches the Bash history, and the feature is especially useful when working with longer commands. As before, type the first characters of the command, and you will see the last command you've used that started with the same characters.

    • Ctrl+Z: Some people use Ctrl+Z to stop a command that is running interactively on the console (in the foreground). Although it does stop the command, it does not terminate it. A command that is stopped with Ctrl+Z is merely paused, so that you can easily start it in the background using the bg command or in the foreground again with the fg command. To start the command again, you need to refer to the job number that the program is using. You can see a list of these job numbers using the jobs command.

    On Linux a user is not always exclusively bound to a person that logs into a computer. A user account is an entity that is created on a Linux system to grant permissions that allow the user to perform specific tasks. User accounts exists for people that need access to a computer, but also for services that need access to specific files and other system resources.

    Apart from the home directory, the only directory where users are allowed to write files is /tmp.

  • 相关阅读:
    maven 笔记
    面试题53:在排序数组中查找数字
    面试题52:两个链表的第一个公共节点
    面试题51:数组中的逆序对
    面试题50_2:字符流中第一个只出现一次的字符
    面试题50:第一个只出现一次的字符
    面试题49:丑数
    面试题48:最长不含重复字符的连续子字符串
    面试题47:礼物的最大值
    面试题8:二叉树的下一个节点
  • 原文地址:https://www.cnblogs.com/Patt/p/6035447.html
Copyright © 2011-2022 走看看