How to get serial number

sudo hdparm -i /dev/sda | grep SerialNo

nvme list (from nvme-cli module)

Listing Users in Linux

cat /etc/passwd

How to use sfdisk command to display boot partition

Type the following command:
# sfdisk -l
# sfdisk -l /dev/sda

Sample outputs:

  • add network interface
  • sudo nano /etc/network/interfaces
  • auto eth0
  • auto eth1
  • iface eth1 inet static  
  • address 192.168.50.22  
  • netmask 255.255.255.0
  • # gateway 192.168.1.1
  • # dns-nameservers 8.8.8.8
  • sudo systemctl restart networking

How to Find My DNS Server IP Address

cat /etc/resolv.conf
or
grep "nameserver" /etc/resolv.conf
  • PHP-FPM Process Calculator
  • Format Disk : sudo mkfs -t ext4 /dev/xvdb
  • How to check boot path (partition) in Linuxlsblk /dev/sda
  • How To Automount File Systems on Linux
    https://www.linuxbabe.com/desktop-linux/how-to-automount-file-systems-on-linux
    • Step 1: Get the Name, UUID and File System Type
      • sudo blkid
    • Step 2: Make a Mount Point For Your Drive
      • sudo mkdir /mnt/bkp
    • Step 3: Edit /etc/fstab File
      • sudo nano /etc/fstab
        • UUID=eb67c479-962f-4bcc-b3fe-cefaf908f01e /mnt/bkp ext4 defaults 0 2
      • sudo mount -a
  • LVM: Add a New Disk to a Volume (linuxhint.com)
  • Format and mount new disk
    • lsblk -f
    • sudo mkdir /mnt/bkp
    • fdisk /dev/xvdb
      • and then format partition
    • sudo mount -t auto /dev/xvdb1 /mnt/bkp
  • Find File in Linux : find / -name ‘zabbix_server.log’
  • Control Panel we should give it a try

https://apiscp.com/features/athena

  • Delete files and directory without prompt rm -r abcd
  • File manager as root usersudo nautilus
  • sudo systemctl restart sshd
  • Install PHP zip Extension
    yum install php-pearyum install php-devel pecl install zip then i gone to the php.ini ( i tried open it on either cyberpanel interface and on terminal) and insert the code:extension=zip.so;
  • visudo –>To make changes to sudo from putty/bash:Type visudo and press enter.Navigate to the place you wish to edit using the up and down arrow keys.Press insert to go into editing mode.Make your changes – for example: user ALL=(ALL) ALL.Note – it matters whether you use tabs or spaces when making changes.Once your changes are done press esc to exit editing mode.Now type :wq to save and press enter.You should now be back at bash.Now you can press ctrl + D to exit the session if you wish.

Leave a Reply

Your email address will not be published. Required fields are marked *