Linux Common Operations Commands

Source: Internet
Author: User

1. Network Query and configuration

Query NIC and configuration information: Ifconfig

Query the specified NIC information: Ifconfig eth1

Configure network card IP information: vi/etc/sysconfig/network-scripts/ifcfg-eth0 (insert: Enter edit mode, Esc,:wq save exit)

Turn off the network card and turn on the network card: Ifdown eth1,ifup eth1

2. Directory file operation

Switch Home directory: CD

Switch to filesystem directory: CD/

Switch to Public directory: CD public

Browse directory contents of file: ls

Browse directory file Details: ls-l

File directory copy: CP (MV: Mobile)

Create folder: mkdir

3, hard disk configuration query

To view disk partition information: DF-LH

4. SSH access to the cluster

Access node: SSH node1 (ssh 10.10.10.1)

Rollback to management node: Exit

With ports and users: ssh-p 2222 [email protected]

5. Samba Shared access

1. Install Samba: You can first check if the installation is installed: RPM-QA | grep samba, without the words to install it yourself, here is an on-line installation mode based on RPM package Yum
Yum is a quick install mode that automatically resolves dependencies on software installation and automatically downloads the appropriate software for installation on a specific server: Yum installs Samba,
2, create the shared folder, this is Mkdir-m 777/home/def/share
3, modify the/etc/samba/smb.conf, the parameters in this is more, mainly
Workgroup = Workgroup (this is the Windows Workgroup mode, and there is a domain mode)
Hosts allow = 192.168.1.100 (can put the IP address to ask, when the Windows address is written here)
Then at the end of the file, add
[Public] (share name, which is the name that will be displayed when Windows is accessed)
Comment = Public Stuff (note)
Path =/home/def/share (share name)
Public = yes (open)
writable = yes (writable)
Of course, here are just some of the basic parameters, as well as other parameters according to the situation settings, such as garbled, and also specify the encoding format.
4. Restart the SMB Service: Service SMB restart
5. Create a Samba customer: Smbpasswd-a def, enter the password after entering. This is the future remote host login required password, where the DEF account must be the system already
Account number, no words will error, and then the new password is a remote login password, the advantage of doing so is their password and remote login separate.
6, Windows connection, start running, enter \\192.168.1.200, enter the SMB account password can be

Linux Common Operations Commands

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.