MoonPoint Support Logo

 

Shop Amazon Warehouse Deals - Deep Discounts on Open-box and Used ProductsAmazon Warehouse Deals



Advanced Search
October
Sun Mon Tue Wed Thu Fri Sat
   
9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31    
2024
Months
OctNov Dec


Mon, Jun 24, 2024 10:30 pm

Installing OpenSSH server software on an Ubuntu Linux system

To set up an Ubuntu Linux system as a Secure Shell (SSH) server, you can take the following steps:
  1. Open a terminal window.
  2. In the terminal window, issue the command sudo apt-get install openssh-server.
  3. Enable and start the ssh server service by issuing the command sudo systemctl enable ssh --now. If you wish to enable the service, but not start it immediately, you can omit the --now at the end of the command, i.e., you can use sudo systemctl enable ssh and then later issue the command sudo systemctl start ssh to start the service.

[ More Info ]

[/os/unix/linux/ubuntu] permanent link

Sun, Jun 23, 2024 7:19 pm

Determining the version of an installed package on an Ubuntu Linux system

If you wish to view information for a package installed on an Ubuntu Linux system, you can use the command apt show packageName or dpkg -s packageName where packageName is the name of the relevant package. If you are only interested in the version number for a package, you can pipe the output of either command into the grep command.

$ apt show net-tools
Package: net-tools
Version: 1.60+git20181103.0eebece-1ubuntu5
Priority: optional
Section: net
Origin: Ubuntu
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: net-tools Team <team+net-tools@tracker.debian.org>
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 819 kB
Depends: libc6 (>= 2.34), libselinux1 (>= 3.1~)
Homepage: http://sourceforge.net/projects/net-tools/
Task: ubuntukylin-desktop
Download-Size: 204 kB
APT-Manual-Installed: yes
APT-Sources: http://archive.ubuntu.com/ubuntu jammy/main amd64 Packages
Description: NET-3 networking toolkit
 This package includes the important tools for controlling the network
 subsystem of the Linux kernel.  This includes arp, ifconfig, netstat,
 rarp, nameif and route.  Additionally, this package contains utilities
 relating to particular network hardware types (plipconfig, slattach,
 mii-tool) and advanced aspects of IP configuration (iptunnel, ipmaddr).
 .
 In the upstream package 'hostname' and friends are included. Those are
 not installed by this package, since there is a special "hostname*.deb".

$ apt show net-tools | grep "Version:"

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

Version: 1.60+git20181103.0eebece-1ubuntu5
$ dpkg -s net-tools
Package: net-tools
Status: install ok installed
Priority: important
Section: net
Installed-Size: 800
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Architecture: amd64
Multi-Arch: foreign
Version: 1.60+git20181103.0eebece-1ubuntu5
Depends: libc6 (>= 2.34), libselinux1 (>= 3.1~)
Description: NET-3 networking toolkit
 This package includes the important tools for controlling the network
 subsystem of the Linux kernel.  This includes arp, ifconfig, netstat,
 rarp, nameif and route.  Additionally, this package contains utilities
 relating to particular network hardware types (plipconfig, slattach,
 mii-tool) and advanced aspects of IP configuration (iptunnel, ipmaddr).
 .
 In the upstream package 'hostname' and friends are included. Those are
 not installed by this package, since there is a special "hostname*.deb".
Homepage: http://sourceforge.net/projects/net-tools/
Original-Maintainer: net-tools Team <team+net-tools@tracker.debian.org>
$ dpkg -s net-tools | grep "Version:"
Version: 1.60+git20181103.0eebece-1ubuntu5
$

Another command that will show you the installed version of a package on a Ubuntu systems is apt-cache policy packageName.

$ apt-cache policy net-tools
net-tools:
  Installed: 1.60+git20181103.0eebece-1ubuntu5
  Candidate: 1.60+git20181103.0eebece-1ubuntu5
  Version table:
 *** 1.60+git20181103.0eebece-1ubuntu5 500
        500 http://archive.ubuntu.com/ubuntu jammy/main amd64 Packages
        100 /var/lib/dpkg/status
$

[/os/unix/linux/ubuntu] permanent link

Thu, Mar 14, 2024 9:29 pm

Checking fan speeds and temperatures in a Linux system

A user reported the sound from a Linux CentOS server was loud. I thought the noise was likely from a fan in the system. The lm_sensors package provides the capability to check central processing unit (CPU) temperatures and fan speeds for systems running a Linux operating system. I first checked to see if the package was installed and found it was installed.

$ rpm -qi lm_sensors
Name        : lm_sensors
Version     : 3.3.4
Release     : 11.el7
Architecture: x86_64
Install Date: Sat 15 Oct 2016 12:14:14 PM EDT
Group       : Applications/System
Size        : 418761
License     : LGPLv2+ and GPLv3+ and GPLv2+ and Verbatim and Public domain
Signature   : RSA/SHA256, Sat 14 Mar 2015 04:15:54 AM EDT, Key ID 24c6a8a7f4a80eb5
Source RPM  : lm_sensors-3.3.4-11.el7.src.rpm
Build Date  : Thu 05 Mar 2015 10:48:12 PM EST
Build Host  : worker1.bsys.centos.org
Relocations : (not relocatable)
Packager    : CentOS BuildSystem <http://bugs.centos.org>
Vendor      : CentOS
URL         : http://www.lm-sensors.org/
Summary     : Hardware monitoring tools
Description :
The lm_sensors package includes a collection of modules for general SMBus
access and hardware monitoring.
$

I then ran the sensors command to view the CPU temperature and fan speeds. The CPU and motherboard (MB) temperatures were high and the output showed 0 RPM for the chassis fan speed, indicating either there was no sensor monitoring its speed or it had stopped rotating.

$ sensors
atk0110-acpi-0
Adapter: ACPI interface
Vcore Voltage:      +1.28 V  (min =  +0.85 V, max =  +1.60 V)
 +3.3 Voltage:      +3.36 V  (min =  +2.97 V, max =  +3.63 V)
 +5 Voltage:        +5.17 V  (min =  +4.50 V, max =  +5.50 V)
 +12 Voltage:      +12.41 V  (min = +10.20 V, max = +13.80 V)
CPU FAN Speed:     2518 RPM  (min =    0 RPM, max = 7200 RPM)
CHASSIS FAN Speed:    0 RPM  (min =  800 RPM, max = 7200 RPM)
CPU Temperature:    +79.5°C  (high = +60.0°C, crit = +95.0°C)
MB Temperature:     +61.0°C  (high = +45.0°C, crit = +95.0°C)

$

References:

  1. How to find fan speed in Linux for CPU and GPU
    By: Vivek Gite
    Last updated: February 11, 2021
    nixCraft

[/os/unix/linux/utilities] permanent link

Sat, Mar 09, 2019 4:25 pm

Installing and using cdparanoia to rip CDs on a CentOS Linux system

If you need to rip a CD from a command-line interface (CLI) on a CentOS Linux system, cdparanoia will allow you to do so. The cdparanoia CD ripper program will allow you to produce Waveform Audio File Format, i.e., .WAV, files from the tracks on a CD. You can use the yum package management software to install the software with by issuing the command yum install cdparanoia from the root account.

[ More Info ]

[/os/unix/linux/centos/music] permanent link

Fri, Mar 08, 2019 9:12 pm

Accessing the RPM Fusion repository from a CentOS system

Sometimes you may find that a software package that you would like to use on a CentOS Linux system is unavailable from the default software repositories, aka "repos." In such cases adding alternative repos, such as Extra Packages for Enterprise Linux (EPEL) or RPM Fusion may allow you to locate the desired package. E.g., the VLC media player is available in the RPM Fusion repository, but not the default ones nor in EPEL. RPM Fusion has two separate software repositories, one that contains free and open-source software (FOSS) and another named "nonfree". Packages in the "nonfree" repository still won't cost you anything, but there may be restrictions on the use of the software, e.g., you may be forbidden from using the software for commercial use. The RPM Fusion site defines the nonfree repo as being 'for redistributable software that is not Open Source Software (as defined by the Fedora Licensing Guidelines); this includes software with publicly available source-code that has "no commercial use"-like restrictions.'

[ More Info ]

[/os/unix/linux/centos] permanent link

Tue, Dec 12, 2017 11:25 pm

NetworkManager and nm-tool

If you wish to check the speed of network interfaces on a CentOS Linux system, if the nm-tool utility, is installed, then you can use it to determine the speed of the network ports.

$ nm-tool

NetworkManager Tool

State: disconnected

- Device: em1 ------------------------------------------------------------------
  Type:              Wired
  Driver:            bnx2
  State:             unmanaged
  Default:           no
  HW Address:        D4:AE:52:CD:0A:D4

  Capabilities:
    Carrier Detect:  yes
    Speed:           1000 Mb/s

  Wired Properties
    Carrier:         on


- Device: em2 ------------------------------------------------------------------
  Type:              Wired
  Driver:            bnx2
  State:             unmanaged
  Default:           no
  HW Address:        D4:AE:52:CD:0A:D5

  Capabilities:
    Carrier Detect:  yes

  Wired Properties
    Carrier:         off


$

If it is installed, the nm-tool program will likely be in /usr/bin . It is part of the NetworkManager package.

[ More Info ]

[/os/unix/linux/centos] permanent link

Sun, Dec 10, 2017 7:39 pm

Determining the version of CentOS on a system

If you are logged into a CentOS Linux system, there are a few ways you can determine the version of CentOS running on the system from a command-line interface (CLI), i.e., a shell prompt.

In the /etc directory, there should be a /etc/centos-release file containing information on the version of CentOS.

$ ls -l /etc/*elease
-rw-r--r--  1 root root  27 Mar 28  2017 /etc/centos-release
-rw-r--r--. 1 root root 152 Nov 25  2013 /etc/lsb-release
lrwxrwxrwx  1 root root  14 Apr 20  2017 /etc/redhat-release -> centos-release
lrwxrwxrwx  1 root root  14 Apr 20  2017 /etc/system-release -> centos-release
$ cat /etc/*elease
CentOS release 6.9 (Final)
LSB_VERSION=base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphi
cs-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
CentOS release 6.9 (Final)
CentOS release 6.9 (Final)
$

To just see the version number, you can use one of the grep commands below.

$ grep -oE '[0-9]+\.[0-9]+' /etc/redhat-release
6.9
$ grep -oE '[0-9]+\.[0-9]+' /etc/centos-release
6.9
$

[ More Info ]

[/os/unix/linux/centos] permanent link

Sat, Jul 15, 2017 10:51 pm

Burning a CD/DVD on a Linux system with the cdrecord command

If you need to burn a CD or DVD from an ISO file from the command line on a Linux system, you can use the cdrecord command. If you include the -v argument to the program, you will see verbose information on the actions performed by the utility and the progress as it writes to the optical disc. When the program is finished you can use the eject command to eject the disc.

[ More Info ]

[/os/unix/linux/utilities/cd-dvd] permanent link

Thu, Jul 13, 2017 11:00 pm

Unbanning an IP address banned with fail2ban

I needed to remove an IP address from the "jail" it was placed in by fail2ban, which is intrusion prevention sotware, due to an incorrect password being entered too many times by a legitimate user of the system during attempts to log into a CentOS Linux system that runs fail2ban. The attempted logins were made via Secure Shell (SSH). After the number of attempts with an incorrect password reached the cutoff for fail2ban to automatically ban the IP address from which the login attempts were originating, the user then got the following error message on subsequent login attempts:

$ ssh jdoe@example.com
ssh: connect to host example.com port 22: Connection refused
$

The fail2ban log on the system is at /var/log/fail2ban.log. You can check that log to see which IP addresses were banned and the time any bans went into effect. So I first verified the IP address from which the login attempts were made.

# tail -n 3 /var/log/fail2ban.log
2017-07-13 21:59:06,304 fail2ban.filter         [1664]: INFO    [sshd] Found 192.168.1.21
2017-07-13 21:59:06,818 fail2ban.actions        [1664]: NOTICE  [sshd] Ban 192.168.1.21
2017-07-13 21:59:11,538 fail2ban.filter         [1664]: INFO    [sshd] Found 192.168.1.21
#

You can determine the name for the jail and IP address is in by issuing the command fail2ban-client status.

[ More Info ]

[/os/unix/linux] permanent link

Tue, Jul 04, 2017 10:47 pm

Determining the model and serial number of a HDD in a Linux system

If you need to know the model number and/or serial number of a hard disk drive (HDD) in a Linux system, one tool that you can use to obtain that information as well as other information on the drive is the lsblk utility, which is included in the util-linux package. E.g.:

# lsblk -o MODEL,SERIAL,SIZE,STATE --nodeps
MODEL            SERIAL            SIZE STATE
WDC WD10EZEX-00W WD-WCC6Y4ZYE4Y3 931.5G running
DVD A  DH16ACSHR 238229911623     1024M running
vmDisk-CD        13043003455      1024M running

You can see the list of arguments you can provide to the program with lsblk -h.

[ More Info ]

[/os/unix/linux/utilities/sysmgmt] permanent link

Valid HTML 4.01 Transitional

Privacy Policy   Contact

Blosxom logo