Linux Command Line skills ZZ

Source: Internet
Author: User
Tags ssh port linux mint

Http://cloud.csdn.net/a/20120321/313378.html

Linux Command Line skills

| 10540 views | [18 comments] comments

Source: linuxstall.com | Author: chankey Pathak | add to my favorites

I will share with you some tips on how to learn Linux Command lines, hoping to help you. If you encounter unfamiliar commands in this article, you can enter the following command on the terminal for help.

1. Man <command>

Where there's a shell, there's a way.

Essential for getting started with Linux

* Understanding Bash: there is no need to study the lengthy bash user manual. You can use man Bash to learn.
* Understand VI: You may use Emacs or eclipse at work, but VI is irreplaceable.
* SSH: learn the basics of password-free authentication.
* Basic bash Job Management Knowledge: such as use &, Ctrl-C, FG, BG, Ctrl-Z, jobs, and kill.
* File management commands: such as hard links, soft links, and permissions.
* Network management commands, such as ifconfig.
* How to use regular expressions and grep and sed.
* Learn to use apt-Get and Yum management software packages.

Improve Daily Work Efficiency

* In Bash, you can use the CTRL + R command to search for the command line history.
* In Bash, you can use Ctrl + W to delete the last word and CTRL + u to delete the entire line.
* Use the CD-command to return to the previous working directory, and use the CD .. command to return to the upper directory.
* Learn how to use xargs:

1. $ find.-Name *. py | xargs grep some_function
2. $ cat hosts | xargs-I {} SSH root @ {} hostnamex

* Run the pstree-p command to view the process tree.
* Learn about different signals. For example, kill-stop [pid] is used to terminate a process. The detailed signal list can be viewed in MAN 7 signal.
* If you want the process to run in the background forever, you can use the nohup and disown commands.
* Run the netstat-lntp command to view the listening process and refer to the lsof command.
* Use subshells In the bash script to group commands:

1. # Do Something in current dir
2. (CD/Some/other/DIR; Other-command)
3. # continue in original dir

* String trim (trimming strings): $ {var % suffix} and $ {var # prefix }. For example, if var?foo=then echo =#var=.pdf.txt .txt prints "foo.txt ".
* Command output can be used as a file. For example, compare local and remote/etc/hosts files:

1. Diff/etc/hosts <(SSH somehost CAT/etc/hosts)

* Learn about "Here documents" in bash ".
* Understand standard output and standard error redirection.
* Learn about ASCIICodeTable. You can run the man ASCII command on the terminal as a reference.
* When working remotely through SSH, you can use screen or dtach to save the session.
* For Web developers, commands such as curl and wget are very useful.
* Convert HTML pages into text files:

1. Lynx-dump-stdin

* The xmlstarlet command is a good tool for understanding XML.
* Understand ssh port ing.
* You can use the Alt + Shift + 3 shortcut to add the comment "#" before the row.

Data Processing

* Understand sort and uniq commands.
* Understand cut, paste, and join commands.
* Learn how to intersection, combine, and set text files:

1. Cat A B | sort | uniq> C # C is a Union B
2. Cat A B | sort | uniq-D> C # C is a intersect B
3. Cat A B | sort | uniq-u> C # C is set difference a-B

* Abstract the second column of a text file. The following code is more refined and fast (3 times) than the same Python code ):

1. awk '{x + = $2} end {print x }'

* Understand the string and grep commands.
* File segmentation: Understand the commands of Split (split by size) and csplit (split by matching.

System diagnostics

* Use the iostat, netstat, top, and dstat commands to view the status of disks, processors, and networks.
* Use commands such as free and vmstat to check the system memory status.
* Use the MTR network diagnostic tool.
* Use iftop, nethogs, and other tools to view the process and bandwidth occupied by the bandwidth.
* Use the AB tool to quickly understand the performance of web servers.
* Use Wireshark and tshark commands to diagnose complex networks.
* Learn how to use strace and diagnose running processes. This analysisProgramThe reason for running errors is very helpful.
* Run the LDD command to view shared library files.
* Learn how to use GDB to connect to a running process and trace the stack.
* Knowledge about/proc is very important.
* How can I diagnose an error? The SAR command is a good choice for collecting, storing, and reporting system information.

Welcome to share

I think there should be a lot of tips that have not been mentioned in this article. I hope you will share your comments with me. (Zhang zhiping/compile)

Original article:

Linux Command Line tips that every Linux User shoshould know

RelatedArticle:

Five free lightweight Linux distributions

Linux performance optimization recommendations

20 Linux Firewall Application Skills

Unix/Linux Network Terminology

Five free lightweight Linux distributions

| 7421 views | [23 comments] comments

Source: webinsightlab.com | Author: webinsightlab.com | add to my favorites

As we all know, open-source operating systems (such as UNIX and Linux) have achieved great success. An important reason for Linux's popularity may be that its release can meet different audiences.

Today, we will introduce you to five free lightweight Linux distributions.

Damn small Linux

Http://www.damnsmalllinux.org/

Damn small Linux is a 50 MB Linux release, but its functions are not inferior:

* Multiple startup modes (such as live CD and USB) are supported)
* Extremely low system requirements (minimum 486 processor and 8 MB memory)
* A complete desktop environment and various application software (such as xmms, web browser, and email)

Linux mint

Http://www.linuxmint.com/

Linux mint is a Ubuntu-based release designed to provide a better user experience. Its slogan is freedom and elegance. It aims to build a perfect Linux Desktop System.

Puppy Linux

Http://www.puppylinux.com/

Puppy Linux is also a very small Linux release, which can be started in Mobile storage such as USB disks, with a size of about 70-140 MB. Puppy Linux focuses on ease of use, and the desktop environment is perfect.

Slitaz

Http://www.slitaz.org/

Slitaz Linux provides complete desktop and server features in less than 30 mb! Slitaz orientedCommunityIt is easy to use and fast and reliable.

Tiny core Linux

Http://distro.ibiblio.org/tinycorelinux/welcome.html

Tiny core Linux may be the smallest Linux release with a size of only 12 Mb! Tiny core Linux includes the Linux GUI desktop environment, which aims to be real-time, simple, and scalable. (Zhang zhiping/compile)

Original article: 5 free lightweight Linux distros

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.