Fdisk is the most commonly used command to check the partitions on a disk. The fdisk command can display the partitions and details like file system type. However it does not report the size of each partitions.
$ sudo fdisk -l
Sfdisk is another utility with a purpose similar to fdisk, but with more features. It can display the size of each partition in MB.
$ sudo sfdisk -l -uM
Cfdisk is a linux partition editor with an interactive user interface based on ncurses. It can be used to list out the existing partitions as well as create or modify them.
Here is an example of how to use cfdisk to list the partitions.
linux cfdisk disk partitions
Cfdisk works with one partition at a time. So if you need to see the details of a particular disk, then pass the device name to cfdisk.
$ sudo cfdisk /dev/sdb
Parted is yet another command line utility to list out partitions and modify them if needed.
Here is an example that lists out the partition details.
$ sudo parted -l
Df is not a partitioning utility, but prints out details about only mounted file systems. The list generated by df even includes file systems that are not real disk partitions.
Here is a simple example
$ df -h
$ df -h | grep ^/dev
$ df -h --output=source,fstype,size,used,avail,pcent,target -x tmpfs -x devtmpfs
Improved version of df, written in python. Prints out all the hard disk partitions in a easy to read manner.
Lists out all the storage blocks, which includes disk partitions and optical drives. Details include the total size of the partition/block and the mount point if any.
Does not report the used/free disk space on the partitions.
Prints the block device (partitions and storage media) attributes like uuid and file system type. Does not report the space on the partitions.
$ sudo blkid
The hwinfo is a general purpose hardware information tool and can be used to print out the disk and partition list.
The output however does not print details about each partition like the above commands.
$ hwinfo --block --short
Inxi is a very useful command line program that can display information about various hardware components present on the system. To display information about the disk drives and storage devices use the "-D" option with inxi.
$ inxi -D -xx
# dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm # dnf install https://rpms.remirepo.net/enterprise/remi-release-8.rpm
EPEL stand for Extra Packages for Enterprise Linux.
EPEL repository is a Fedora Special Interest Group that creates, maintains, and manages a high quality set of additional packages for Enterprise Linux,
including, but not limited to, Red Hat Enterprise Linux (RHEL), CentOS and Scientific Linux (SL), Oracle Enterprise Linux(OEL).
Extra Packages for Enterprise Linux (EPEL) - (See http://fedoraproject.org/wiki/EPEL) provides rebuilds of Fedora packages for EL6 and EL7. Packages should not replace base, although there have been issues around point releases in the past. You can install EPEL by running yum --enablerepo=extras install epel-release. The epel-release package is included in the CentOS Extras repository that is enabled by default. Support available on Freenode in #epel, on mailing lists, and its issue tracker. If you are willing to help test EPEL updates before they are pushed to stable, you can enable the epel-testing repository on your development/testing servers. Enabling epel-testing on production systems is not a good idea.
Remi repository is a yum repository maintained by a French dude – Remi Collet. This post describe the basic steps to prepare and install the additional
CentOS packages with EPEL and Remi Repository into CentOS 6.
Remi Repository - (See http://rpms.remirepo.net/) Remi Collet maintains a large collection of RPMS, including latest versions of PHP etc.
He's also got an FAQ at http://blog.remirepo.net/pages/English-FAQ .
Note that this is a collection of repos, and using the -safe series will ensure that nothing from the base CentOS Linux distro is overwritten or replaced.
However, be aware that this repo does not play nicely with other third party repos - for example,
Remi's packages contain Obsoletes: lines for packages from both IUS and Webtatic repos and thus will automatically replace them with the .remi version.
This may not be the desired behaviour and you should be careful with enabling this repo for that reason.
About 'enabled' and 'disabled' repository configuration files
Please read man 5 yum.conf, particularly the discussion of enabled=0 versus enabled=1 . A line containing one of these options is recommended for each repository in each .conf file in the /etc/yum.repos.d/ directory. This allows the administrator to more clearly specify whether a repository is or is not used for packages. After any edits of these files, in order to clear any cached information, and to make sure the changes are immediately recognized, as root run:
# yum clean all
After modifying the repository file with new entries, proceed and clear the DNF / YUM cache as shown.
# dnf clean all OR # yum clean all
To confirm that the system will get packages from the locally defined repositories, run the command:
# dnf repolist OR # yum repolist
The document translated automatically
Adding a user to SAMBA
We do it in two steps
1) add the user to the server LINUX / UNIX using the command useradd / adduser
2) The same user can be added to the samba server using the smbpasswd command.
Step 1 Add the user to Linux / Unix
Add the command line in the user's shell configuration file /etc/adduser.conf.
We can do this by using useradd
Enter the command line command
Step 2 Add the user to the samba
New user connecting to the server to get to the Samba server must wear an additional password.
Add the password with the command:
#smbpasswd s karol
Step 3 Add the user to the shared Samba
By default, a newly established user has access to your home folder / home / charles.
If karol wants to have access to another foldru eg / data / accounts which is provided by the server SAMBA should he add such access.
Open the file /etc/samba/smb.conf and modify access to your account.
comment = Accounts data directory
path = / data / accounts
valid users = kinia test karol
public = no
writable = yes
After making the changes save the file
Step 4 restart samba server.
perform this command
#service smb restart
# /etc/init.d/smb Reload
From this point the user can log on to the SAMBA server to shared resources
The document translated automatically
Changing the time linux
How can I change the date and time from the command line? We connect via SSH to a remote server.
If you can not change the time from the command line you can always be done with the X terminal as root.
This komneda is used in linux to change the time or date changes. This can be done only with administrative privileges. This is useful if the Linux server time and / or date is wrong, and you need to set it to new values from the shell prompt.
Change of Dates - Linux
Use the following syntax to set new date and time:
date --set = "STRING"
For example, set new date is 2 Oct 2006 6:00:00 p.m., type the command as root Us Help user:
# Date -s "2 OCT 2006 6:00:00 p.m."
# Date --set = "2 OCT 2006 6:00:00 p.m."
You can also simplify format using Help Us syntax:
# Date +% Y% m% d -s "20081128"
Linux Set Time
This set time use the Help Us syntax:
# Date +% T -s "10:13:13"
10: Hour (hh)
13: Minute (mm)
13: Second (ss)
Use% p locale's equivalent of either AM or PM, enter:
# Date +% T% p -s "6:10:30 AM"
# Date +% T% p -s "12:10:30 PM"