In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-22 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Foreword:
Linux is an open source, free operating system. Its stability, security and handling multiple concurrency have been recognized by the industry. At present, many enterprise-level projects will be deployed to the Linux/unix system. If you don't know much about Linux, I hope this article will get you started with Linux.
Introduction of 1.Linux and its difference from Windows
Like the well-known Windows operating system software, Linux is also an operating system software. Different from Windows, Linux is a set of open source program and Unix-like operating system software that can spread freely.
Linux at the beginning of the design, is based on Intel x86 series CPU architecture computer, it is a POSIX-based multi-user, multi-task and support multi-threading and multi-CPU operating system, it is designed and developed by thousands of programmers around the world, the original purpose of the development of Linux system is not restricted by any commercial software copyright, the world can freely use Unix-like operating system compatible products.
In the past 20 years, Linux system has been mainly used in server-side, embedded development and PC desktop, among which the server-side field is the most important. For example, the large and super-large Internet enterprises we are familiar with are using Linux system as their server-side program running platform, and the mainstream systems used by major websites are Linux systems. The more commonly used distributions are Ubuntu, RedHat, CentOS, Debain and so on.
Compared with Windows, Linux is relatively more secure and stable, and Linux can be customized or choose a different distribution. Here is a picture on the Internet to show the difference between Linux and Windows.
Cdn.nlark.com/yuque/0/2020/png/119537/1590999082033-9e79be25-054f-4333-a55d-f622c829c195.png ">
two。 The basic command is tested.
Most of the operations of Linux can be done at the terminal through the command line, especially for the Linux system used as a server, this kind of system generally has no graphical desktop, so we can operate the Linux system by mastering some basic Linux commands. The following is a brief summary of some basic commands for terminal operation under Linux.
# directory operation mkdir: create a directory-p: create a recursive directory, that is, you can create multiple directories at a time: mkdir {aMagib _ pje _ d _ e _ e _ f} create multiple directories at a time. Rmdir: delete an empty folder cp: copy the file or folder-a =-pdr-p and copy the file attributes at the same time, such as the modification date-d copy to retain the file link-r: when copying the folder, the recursive copy subfolder-l does not copy, but creates a link file to the source file, the link file name is given by the target file. Note: you can rename mv while copying: move files or folders, and rename rm when you move: delete files or folders-r: delete recursively-f: force deletion without reminding # file processing command vi/vim: edit files I: insert text before the current character;: wq: perform save exit operation in command mode : W: in command mode, execute the save operation;: W! : in command mode, perform a forced save operation;: Q: in command mode, perform an exit vi operation;: Q! : in command mode, perform a forced exit vi operation;: set number: in command mode, it is used to display line numbers at the leftmost end;: set nonumber: in command mode, line numbers are not displayed at the far left end Ls: view files-l view as a list-h view in a humane way, and the file size is displayed in appropriate units-a view all files, including hidden files-I show the file I node number touch file name: create a file can create multiple files at a time Separate cat with spaces: view file contents-n: display file contents in reverse with line number more: view file contents in pages after entering browse mode: F or space: next page enter: turn down Q: exit less: view file contents, turn pages, enter enter line feed pageup: previous page pagedown: next page up arrow : flip down arrow: scroll down / search word n look down for head-n file name: n lines before viewing the file. The default-n displays the first 10 lines of tail-n filename: view the last few lines of the file-f: dynamically display the end of the file # Rights Management Command chmod: permissions to modify a file or directory Only root and owner can change [{ugoa} {+-=} {rwx}] [file or directory] [mode=421] [file or directory]-R recursively modify the numerical representation of permission: r-> 4w-> 2x-> 1 example: chmod upright x a.txt chmod Grouw Chmod g=rwx a.txt chmod a.txt / / modify multiple permissions at the same time chmod g=rwx a.txt chmod 640 a.txt chmod-R 777 testdir / / change the permissions of the directory and all the following files chown: change the file owner Only root can change chown root a.txt// to change a.txt to all root # compression and decompression commands .gz format compression: gzip file name can only compress files, not directories, and the source file is also missing after compression: gunzip/gzip-d compression package name tar:-zcvf compressed file name packaged directory: generate .tar.gz file Note: this command is first archived with tar Then compress the archived package into the file name to be extracted by .gz-zxvf: extract the .tar.bz2 file name-jcvf compressed file name packaged directory: generate .tar.bz2 Note: this command is archived with tar first. Then compress the archived package to .bz2-jxvf to extract the file name: extract the .tar.bz2 file zip: zip-r compress the resulting file name to compress the zip compressed file name to compress the file. Unzip: unzip File to be unzipped bzip2: bzip2-k File name to be compressed-k option: keep the source file bunzip2-k File name to be extracted-k option: keep the zip package * part of the content reference from: https://www.jianshu.com/p/6ea061f74d843. Suggestions on Linux Learning
Beginners may see that the above command will be confused, in fact, after familiar with it will find it very convenient, for example, in Windows, to create a directory layer by layer to the corresponding directory and then right-click to create a new directory, while in Linux only need to add the directory name after mkdir. As the saying goes, command-line operation will greatly improve office efficiency.
Some of my readers are students who have not yet entered the workplace, and you may not be familiar with the operation of Linux. As an experienced person, here briefly, if you want to work in the computer Internet industry in the future, you will be more or less exposed to Linux, most of the applications in the Internet industry are running on Linux systems. So if you are not familiar with Linux, it is recommended that you learn Linux as soon as possible, which will enhance your job-hunting competitiveness after graduation. Of course, most of us use Windows or macOS systems in our office. If you don't have a Linux system on hand, here's a recommendation for Tencent CVM. Tencent Cloud 618 activities come for as little as 95 yuan a year! You can own a CVM for only 7 yuan a month, and partners who want to experience the Linux system can buy it.
Newcomers have their own server to do some small things:
Learn the Linux command and understand the Linux system. Deploy the Java environment, install MySQL,Docker,Git, etc., these frameworks are very convenient to deploy in Linux, it is more troublesome to install on Windows. Hang the little things you write on the server and set up a personal blog site.
Partners who want to buy can copy the link: https://url.cn/ukje2sFM to the browser to open the purchase. This activity is aimed at new users. If you are not a new user, you can borrow the information of your family and friends to re-register. The server costs 95 yuan a year, doesn't it smell good?
Summary:
The original intention of writing this article is just to remind you that Linux is really important, and you will come into contact with it more or less in future work, and learn early and benefit early. Many friends may not have experienced a CVM, so you can take this opportunity to buy a CVM and buy some wool from Tencent. The author bought a server in Tencent Cloud on Singles Day last year, which is very good for daily learning test. Students who need it can click the link https://url.cn/ukje2sFM to go to the purchase page.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.