How to Identify the File System Type in Linux/Solaris

heroes

Salam..

There are few methods how to determine your linux file system. Below are commands that I usually use.

Linux

$ df -Th
$ df -Th | grep "^/dev" 
$ fsck -N /dev/sd*
$ lsblk -f
$ mount | grep "^/dev"
$ cat /etc/fstab

Solaris

$ df -n 
$ mount -p
$ zfs list
$ fstyp /dev/rdsk/c*d*s*

wassalam..

Advertisements
Posted in freeBSD, Linux, Solaris, UNIX | Tagged ,

Happy New Year 2018!

..

Last login: Tue Jan 2 12:11:49 2018 from 104.223.123.98
[hanief@master ~]$ mv 2017 /archive
[hanief@master ~]$ sudo mkdir 2018
[hanief@master ~]$ cd 2018
[hanief@master ~]$ vi goals.sh
[hanief@master ~]$ chmod +x goals.sh
[hanief@master ~]$ nohup ./goals.sh &
[hanief@master ~]$ exit

..

Posted in Linux, UNIX | Tagged ,

CentOS-7 “Minimal Desktop” installation (GNOME)

zombie-gnomes-of-the-apocalypse-revenant-fx-15_edit

Assalamualaikum..

For some reasons you need to install GUI on your CentOS server. In my case, I having a bad time to install Oracle Database 12c in my CentOS using CLI. I don’t have plenty of times struggling with CLI environment. I have to finish my work as soon as possible so then I can enjoy my coffee. I just need a very minimal GUI to achieve my goal.

Follow the steps below;

  1. Install CentOS-7 – Minimal (of course)
  2. yum groupinstall “X Window System”
  3. yum install gnome-classic-session gnome-terminal nautilus-open-terminal control-center liberation-mono-fonts
  4. unlink /etc/systemd/system/default.target
  5. ln -sf /lib/systemd/system/graphical.target /etc/systemd/system/default.target
  6. reboot

Now you have a CentOS-7 Minimal Desktop installation LIKE CentOS-6 Minimal Desktop

Enjoy!

wassalam..

Posted in Install, Linux, UNIX | Tagged , , , , , , , ,

Enable Snipping Tools in Win Server 2012 R2

Salam..

Snipping Tool is not enabled by default in Wndows Server 2012 R2. To install Snipping Tool, just follow the next instructions:

  1. Go to Server Manager
  2. Click Manage in the upper right corner.
  3. Click Add Roles and Features.
  4. Click Next > Next > Next.
  5. At Server Selection select your server.
  6. Click Next > Next.
  7. At Features expand User Interfaces and Infrastructure.
  8. Check Desktop Experience.
  9. If an Add Roles and Features Wizard window pops up with a list of features required for Desktop Experience , just click Add Features.
  10. Click Next > Install.
  11. Restart your server. (Restart?? WTF..Stupid Windows)

Wassalam..

Posted in Windows | Tagged , , , , , , , , ,

How to Setup network on RHEL/CentOS 7 (Minimal)

Assalamualaikum…

Issue: Not able to connect to network/internet.
Caused by: Ethernet interfaces are not enabled by default.

Step 1: First, type “nmcli d” command in your terminal for quick list ethernet card installed on your machine:
Screen Shot 2017-12-09 at 02.23.48

Step 2: Type “nmtui” command in your terminal to open Network manager. After opening Network manager chose “Edit connection” and press Enter (Use TAB button for choosing options).
Screen Shot 2017-12-09 at 02.27.44

Step 3: Now choose you network interfaces and click “Edit”
Screen Shot 2017-12-09 at 02.31.07

Step 4: Configure DHCP. Choose “Automatic” in IPv4 CONFIGURATION and check Automatically connect check box and press OK and quit from Network manager.
Screen Shot 2017-12-09 at 02.34.09

Step 5: Reset network services. Run service network restart

Now test your connection.

wassalam..

Posted in Linux, UNIX | Tagged , ,

-bash: warning: setlocale: LC_CTYPE: cannot change locale (UTF-8): No such file or directory

Assalamualaikum,

This warning/error ever happened to you? Whenever you try to ssh to your server or try to update your spamassassin (sa-update) you will get this error.

Last login: Mon Nov  6 11:17:54 2017 from 192.168.88.14
-bash: warning: setlocale: LC_CTYPE: cannot change locale (UTF-8): No such file or directory
[root@sa ~]# sa-update
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
	LANGUAGE = (unset),
	LC_ALL = (unset),
	LC_CTYPE = "UTF-8",
	LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").

Follow below steps to fix it.

  1. login to your server
  2. vi /etc/environment and add below lines

  3. LANG=en_US.utf-8
    LC_ALL=en_US.utf-8

  4. Save and quit
  5. Done

Wassalam…

Posted in Uncategorized

Create a Bash Alias in OSX/MacOS

Assalamualaikum,

When I bought my Mac, the .bash_login file wasn’t there. I need to create it for myself so that I could put prompt info, alias, functions, etc. in it.

Here are the steps if you would like to create one:

  1. Start up Terminal
  2. Type cd ~/ to go to your home folder
  3. Type touch .bash_profile to create your new file.
  4. Edit .bash_profile with your favorite editor (or you can just type open -e .bash_profileto open it in TextEdit.
  5. Type . .bash_profile to reload .bash_profile and update any alias you add.

wassalam..

Posted in Mac, MacOS, OSX, UNIX | Tagged , , ,