# cat /etc/crontab (To read/print any file) # cat –n /etc/crontab (To print files with line number) # cat /etc/crontab /etc/passwd (To print multiple files together) # tac /etc/crontab (To print exact opposite output from cat command) # wc /etc/crontab (To print line, word, character count of file) # wc -l /etc/crontab (To print line […]
When you work in Linux Terminal, It involves using keyboard shortcuts to perform common tasks. Here are some useful shortcuts: History Shortcuts: Up Arrow / Down Arrow: Navigate through command history. Ctrl + R: Reverse search in command history. !!: Repeat the last command. !n: Repeat the nth command in history. Navigation Shortcuts: Ctrl + […]
VI Editor is a powerful and mostly used text editor in Unix operating system. It is known for its efficiency, speed etc. There are few modes in edior. The most common are Insert mode and Command-Line mode. In insert mode, you can insert and edit text which is in file. While the Command-Line mode allows […]
ethtool: # ethtool eth0 (view ethernet device properties) # ethtool -s eth0 autoneg off (make changes in NIC parameter, use "-s") # ethtool -s eth0 speed 100 autoneg off duplex full (change the speed of ethernet card) # ethtool -i eth0 (Display driver settings) # ethtool -a eth0 (Display Auto-negotiation, RX and TX) # ethtool […]
grep Commands: # grep root /etc/passwd (To print lines containing word root) # grep -c root /etc/passwd (To count the no. of lines containing word root) # grep -v root /etc/passwd (To print all lines except containing matched word “root”) # grep -cv root /etc/passwd (To count no. of lines occurred by –v) # grep […]
some useful “yum” and “rpm” commands: # rpm –checksig <.rpm> (Need to check signature of an rpm) # rpm -ivh <rpm-package> (Installing an rpm package) # rpm -qpR <rpm-package> (Checking dependencies of rpm package before installing it) # rpm -ivh –nodeps <rpm-package> (Installing a rpm without dependencies) # rpm -qa <rpm> (Checking installed rpm) # […]
Check version of openssl: # openssl version Print available commands for openssl: # openssl list -standard-commands or # openssl help Check SSL certificate of mentioned URL: # openssl s_client -connect varelite.com:443 -showcerts To generate rsa key: # openssl genrsa -out testing.key 2048 Generate CSR and RSA key: # openssl req -out testing.csr -newkey rsa:2048 -nodes […]
RPM vs dpkg Function rpm command dpkg command List installed packages rpm -qa dpkg -l List content of installed package rpm -ql “pkgname” dpkg -L “pkgname” List content of package file rpm -qlp “pkgname”.rpm dpkg –contents “pkgname”.deb Install package rpm -i “pkgname”.rpm dpkg -i “pkgname”.deb Show to which package a file belongs rpm -qf /path/to/file […]
In RHEL8, Network is managed by NetworkManager daemon. We can use it to configure and manage networks in system.NetworkManager package is preinstalled in RHEL8.nmcli tool can be used to configure networks using command line. nmtui is text-based user interface for NetworkManager.You can still use ifcfg files to configure network configurations. Service “NetworkManager” is used for starting/stopping […]
Recent Blog