Linux basic commands

Source: Internet
Author: User

1. Configure a static Ubuntu IP address for the NICVi/etc/network/interfaces auto eth0 iface eth0 inet static address 192.168.0.5 gateway 192.168.0.254 NETMA SK 255.255.255.0 Dns-nameservers 223.6.6.6 2. Modify the download sourceVi/etc/apt/sources.listapt-get Updateapt-get Upgradeapt-get Dist-upgrade 3. Shutdown/ RestartShutdown-h Nowreboot 4. Modify the HostsVi/etc/hosts 5. Restart the NICIfdown eth0 && ifup eth0 6. Modify Host nameVi/etc/hostname 7. Apt-get relatedApt-cache Search Packages Apt-cache Show package information about packages, such as description, size, version Apt-get install package installation Packages Apt-get Update update source apt- Get upgrade update installed packages Apt-get Dist-upgrade upgrade system 8. View the processPs-aux 9. Turn on the route forwarding functionVi/etc/sysctl.confnet.ipv4.ip_forward=1 10. Mount the discMkdir/mnt/cdrommount/dev/cdrom/mnt/cdrom 11. Delete Non-empty foldersRm-rf/home/dir 12. View all users in the systemCat/etc/passwdchen:x:1000:1000:chen,,,:/home/chen:/bin/bash User name: Password: uid:gid: User description: Home directory: Login Shell

Linux basic 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.