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.

  • 相关阅读:
    腾讯云搭建web环境基础指导
    php正则表达式填坑
    微信小程序新手填坑
    如何优雅的扒网站——工具篇
    两个常见的前端问题:如何让分页码居中显示 及 解决浮动元素覆盖的问题
    非常全面的PHP header函数设置HTTP头的示例
    Nginx + fastcgi + php 的原理与关系
    Linux命令之 tar
    数据结构和算法
    单例模式
  • 原文地址:https://www.cnblogs.com/Patt/p/6035447.html
Copyright © 2011-2022 走看看