NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

1. Kiểm tra phiên bản hệ điều hành Linux đang chạy
[root@localhost ~]# cat /etc/centos-release
2. Kiểm tra các ổ hiện tại trên hệ thống
[root@localhost ~]# fdisk -l
3. Kiểm tra các phân vùng và mức độ sử dụng trên các phân vùng
[root@localhost ~]# df -h
4. Kiểm tra số lượng CPU của VPS:
[root@localhost ~]# nproc
5. Kiểm tra dung lượng RAM
[root@localhost ~]# free -m
6. Kiểm tra
[root@localhost ~]# top -c
7. Các lệnh xử lý file
[root@localhost ~]# cd /dir - Di chuyển tới 1 thư mục dir
[root@localhost ~]# pwd - Hiển thi đường dẫn thư mục hiện hành
[root@localhost ~]# mkdir inet - Tạo 1 thư mục có tê inet
[root@localhost ~]# rm tesst.txt - Xóa 1 file test.txt
[root@localhost ~]# rm -rf dir/ - Xóa toàn bộ thư mục dir và các file bên trong
[root@localhost ~]# mv dir1 dir2 - Đổi tên thư mục dir1 thành dir2
[root@localhost ~]# cp file1 file2 - Copy file 1 thành file 2
[root@localhost ~]# cat hautx.txt - Xem nội dung 1 file có tên hautx.txt
[root@localhost ~]# tail -f /var/log/message - Hiện nội dung của file message và cập nhật liên tục, khởi đầu với 10 dòng cuối.
8. Lệnh quản lý tiến trình
[root@localhost ~]# ps -ef| grep ..... Kiểm tra một tiến trình mong muốn đang hoạt động
[root@localhost ~]# top -c - Hiển thị các tiến trình đang chạy.
[root@localhost ~]# kill pid - Dừng ép 1 tiến trình đang chạy
9. Quyền sử dụng tập tin
[root@localhost ~]# chmod 755 hautx.txt - Phân quyền sử dụng tập tin hautx.txt
(Chú ý:Mỗi chữ số ứng với từng tài khoản có được bằng cách cộng các số sau: 4 – đọc (r); 2 – ghi (w); 1 – thực thi (x))
[root@localhost ~]# chown hautx:hautx test.txt - Phân quyền sở hữu file test.txt cho user hautx
[root@localhost ~]# chown -R hautx:hautx inet/ - Phân quyền sở hữu toàn bộ thư mục và các file; các thư mục inet
10. Remote SSH
[root@server ~]# ssh -p port user@host - Kết nối remote SSH qua port bằng user tới máy chủ host.
VD: [root@server ~]# ssh -p 2220 [email protected]
11. Nén và giải nén
[root@server ~]# zip -r folder.zip folder- Nén một thư mục folder
[root@server ~]# unzip file.zip - Giải nén 1 file.zip.
[root@server ~]# tar -zcf folder.tar.gz folder - Nén một thư mục dạng .gz.
[root@server ~]# tar -zxvf file.tar.gz - Giải nén.
12. Cài đặt và gỡ bỏ phần mềm
[root@localhost ~]# rpm -ivh đường_dẫn_package => Cài đặt 1 phần mềm (Cài Offline) ví dụ:
[root@localhost ~]# rpm -ivh /media/CentOS/gcc-4.1.2-51.el5.i386.rpm
Kiểm tra 1 phần mềm đã được cài đặt hay chưa:
[root@localhost ~]# rpm -qa| grep
Gỡ bỏ 1 phần mêm đã cài đặt, VD gỡ bỏ phần mềm htop
[root@localhost ~]# rpm -e htop
Cài đặt một phần mềm với máy chủ có kết nối mạng với yum, VD cài đặt phần mềm MC
[root@localhost ~]# yum install -y mc (-y nghĩa là đồng ý cài đặt không cần hỏi)
Update cho 1 gói phần mềm với yum, VD update phần mềm rdesktop
[root@localhost ~]# yum update rdesktop -y
Gỡ bỏ một phần mềm với yum:
[root@localhost ~]# yum remove rdesktop -y
Tải một phần mềm về server, VD tải phần mềm xvnkb có link như bên dưới.
[root@localhost ~]# wget http://ncu.dl.sourceforge.net/xvnkb/0.2.11/xvnkb-0.2.11.tar.gz
VD: Check xem phần mềm htop đã được cài đặt hay chưa
[root@localhost ~]# rpm -qa| grep htop
htop-2.0.1-1.el7.x86_64
     
 
what is notes.io
 

Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...

With notes.io;

  • * You can take a note from anywhere and any device with internet connection.
  • * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
  • * You can quickly share your contents without website, blog and e-mail.
  • * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
  • * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.

Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.

Easy: Notes.io doesn’t require installation. Just write and share note!

Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )

Free: Notes.io works for 12 years and has been free since the day it was started.


You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;


Email: [email protected]

Twitter: http://twitter.com/notesio

Instagram: http://instagram.com/notes.io

Facebook: http://facebook.com/notesio



Regards;
Notes.io Team

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.