Linux-cento OS Learning Note 3

Source: Internet
Author: User

1. View System Information

The uname directive can be used to see what system is currently

Uname-r to view kernel version

To view the CPU information is to use the Cat/proc/cpuinfo

Viewing memory information using Cat/proc/meminfo

Date View system date

Cal 2018 Displays the 2018 calendar table

Setting the system time requires the use of date-s under the root user

2. Disk operation

DF-LH Show Current disk status

Du-sh/home/xxx/home/xxx is the directory name

To view the current directory as a disk size

Repair Disk fsck/dev/xxx The command will repair the disk automatically

/dev/xxx is the directory name

Mount View Mount disk information

MOUNT/DEV/XXX mount the specified disk

UMOUNT/DEV/XXX uninstalling the specified disk

3. Memory operation

See Overall memory usage free-m

View the usage top of each process memory

4. Network operation

Ping test connectivity, too common

5.linux Software Installation Method

The first way

RPM command

1. Check if a software is installed

#rpm-qa|grep Java

2. Uninstalling the Installed software

#rpm-e--nodeps xxxxxxx

3. Installing the Software

#rpm-IVH xxx.rpm

The second way

Tar source compilation is not recommended for use

Insert a digression, for the use of zip software

Unzip $ unzip Xxx.zip

Compress $ zip yy.zip file

and the Tar Software

Extract

Extract to current directory $ TAR-ZXVF xxxx.tar.gz

Unzip to the specified directory $ tar-zxvf xxxx.tar.gz-c dir

Compression

$ tar-zcvf xxxx.tar.gz dir

Third Kind

Yum

Very common, but need to configure the source

6. How to set sudo permissions for normal users

Switch to root user first

Then #vi/etc/sudoers

Add the following code in the first line

XX all= (Root) nopasswd:all

XX is replaced with the current user name can be

7. Firewalls

View firewall status
$ sudo service iptables status

Shutting down the firewall
$ sudo service iptables stop

Start the firewall
$ sudo service iptables start

Permanently set firewall off
$ sudo chkconfig iptables off

8.SELINUX

Turn off the service as soon as you change selinux=enforcing in/etc/sysconfig/selinux to selinux=disabled

9.crontab

For users

Each user can schedule their own tasks

Create a scheduled task under a user

For example, implementation occurs every minute, and time is written to the specified file

$ crontab -e### first crobtab*/1 * * * * /bin/date >> /home/freezeriver/bf-log.txt

List all the current scheduled tasks
Crontab-l

Delete all Scheduled Tasks
Crontab-r

Linux-cento OS Learning Note 3

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.