fbpx

Linux Command List most used by Database Administrator (DBA)

    ls – Lists the contents of the current directory.
    cd – Changes the current working directory.
    pwd – Prints the current working directory.
    mkdir – Creates a new directory.
    touch – Creates a new file or updates the timestamp of an existing file.
    rm – Removes a file or directory.
    rmdir – Removes an empty directory.
    cp – Copies a file or directory.
    mv – Moves or renames a file or directory.
    cat – Displays the contents of a file.
    head – Displays the first few lines of a file.
    tail – Displays the last few lines of a file.
    grep – Searches for a pattern in a file.
    find – Searches for files or directories in a directory hierarchy.
    ps – Displays information about running processes.
    top – Displays information about system resources and processes.
    kill – Sends a signal to a process to terminate it.
    ping – Tests network connectivity to a server.
    ssh – Connects to a remote server over SSH.
    scp – Copies files between hosts over SSH.
    tar – Creates or extracts a tar archive.
    gzip – Compresses or decompresses files using gzip compression.
    chmod – Changes the permissions of a file or directory.
    chown – Changes the owner of a file or directory.
    su – Switches to the superuser or another user account.
    sudo – Executes a command with elevated privileges.
    df – Displays information about disk usage.
    du – Displays information about file and directory sizes.
    ifconfig – Displays information about network interfaces.
    iwconfig – Displays information about wireless network interfaces.
    mount – Mounts a file system.
    umount – Unmounts a file system.
    ssh-keygen – Generates SSH public and private key pairs.
    scp – Copies files between hosts over SSH.
    wget – Downloads files from the internet.
    curl – Transfers data from or to a server using various protocols.
    netstat – Displays network connections, routing tables, and network interfaces.
    route – Manipulates network routing tables.
    uname – Displays information about the operating system.
    date – Displays or sets the system date and time.
    whoami – Displays the current user.
    id – Displays information about a user or group.
    groups – Displays a user’s group memberships.
    passwd – Changes a user’s password.
    adduser – Adds a new user account.
    userdel – Deletes a user account.
    visudo – Edits the sudoers file for configuring sudo access.
    crontab – Schedules tasks to run at specified intervals.
    systemctl – Controls the system’s systemd system and service manager.
    journalctl – Views and manages system logs.

These commands are just a few of the many commands available in Linux, but they should be enough to get you started with basic file and system management tasks.

 

How to Fix Cannot open your terminal ‘/dev/pts/2’ – please check

Normally we see a common error when we switch or sudo to a user to run the screen session and it gets closes with the error ‘Cannot open your terminal ‘/dev/pts/2′ – please check’. fix it very tiny but it took a long for me to find so I thought I will share the quick fix and save our prices time.

Error:

[thedbadmin@testdb01 ~]$ screen -x 12991.screen_testCannot open your terminal ‘/dev/pts/0’ – please check.[thedbadmin@testdb01 ~]$

Step 1: logout from the user that you have logged in.

Step 2: log as your user or from where you want to run screen and just give full privileged to /dev/pts/* 

Fix : 
$ chmod 777 /dev/pts/*

 

Note: if you get any warning or error after executing the above command,  just ignore it safely.

Now you can start the screen again hopefully you won’t see that error again

Happy programming !!!

How to fix centos full screen issue in Oracle VirtualBox

How to Fix CentOS Full-Screen Issue on Oracle Virtual Box

We install centos7 on top of Oracle VirtualBox and after even successful installation we don’t see the full-screen under Virtual machine the same like the following image.

 

This post has step by step workaround to get the full-screen Centos on the virtual box and you can also adjust the screen resolution once you are all set.

Read more