I am a new Unix shell programer. How can I extract the directory name from a full path (say /nas01/data/backups/file.tar.gz)? How do I get directory name from its path on a Linux or Unix-like system?

{ 0 comments }

I am a new Linux server user. I need to tunnel X over ssh. I type the following command on a CentOS/RHEL based remote host to get display on a local desktop:

ssh -X user@server1.cyberciti.biz
xeyes &
firefox &

But, I am getting an error that read as follows:

**error**: Failed to contact configuration server; some possible causes are that you need to enable TCP/IP networking for ORBit, or you have stale NFS locks due to a system crash. See http://projects.gnome.org/gconf/ for information. (Details – 1: Failed to get connection to session: /bin/dbus-launch terminated abnormally without any error message)

How do I fix this error on a newly formatted/installed RHEL or CentOS Linux 6.x server?

{ 3 comments }

I am a new Linux server user. I need to tunnel X over ssh. I type the following command from OS X Unix terminal to login into far_away_machine (a centos server):

ssh -X -o options -A -p 22 user@centos-far-away-server

But, I am getting the following error on screen:

X11 forwarding request failed on channel 0
Last login: Sun Mar 23 15:58:51 2014 from 1.2.3.4

How do I fix “X11 forwarding request failed on channel 0″ on Linux or Unix-like systems?

{ 2 comments }

I‘m a new Ubuntu Linux user and my cloud hosting company installed MySQL server by default. I need to remove it and delete it from my server as I have no use of MySQL server. How can I uninstall MySQL on a Ubuntu based systems?

{ 4 comments }

I am a new Linux and Unix-command line user. I am using find command to search file called “fooBar.conf.sample” in my home directory. I do not know the case, it could be uppercase, lowercase, or a mix of both. How can search a file and ignore case on a Linux or Unix-like system?

{ 1 comment }

I recently read that SSH keys provide a secure way of logging into a Linux and Unix-based server. How do I set up SSH keys on a Linux or Unix based systems? In SSH for Linux/Unix, how do I set up public key authentication?

{ 6 comments }

chroot command

I am a new Linux and Unix user. How do I change the root directory of a command? How do I change the root directory of a process such as web-server using a chroot command to isolate file system? How do I use a chroot to recover password or fix the damaged Linux/Unix based environment?

{ 4 comments }