MATLAB: Can’t I use the UNIX or ! commands in MATLAB 6.0 (R12) if I have an older Linux kernel

2.2.132.2.14MATLAB

When I start MATLAB, I get the following message although MATLAB does come up just fine.
---------------------------------------------------------------
Warning: Linux 2.2.2 - your operating system
Linux 2.2.15 - MATLAB built using
this system
---------------------------------------------------------------
??? MATLAB was unable to open the
pseudo-tty master device /dev/ptmx. The unix()
and ! commands will not work in this MATLAB
session. Other commands which depend
upon unix() and ! will fail. Please check with
your system administrator and confirm that
this device exists with the proper permissions.
%
I just can't use UNIX or ! commands in MATLAB.

Best Answer

The warning about the different kernel versions can be ignored. We warn about this by default, but there are no significant differences between the two kernels that would cause any trouble.
The problem with UNIX and ! commands needs to be resolved on your part. Please see below for help on this.
MATLAB R12 relies on a working Unix98 pty setup. This was available on all the major distributions long before we shipped, though it's possible for someone who has upgraded piecemeal to have
missed this one.
Things to look for:
1. The device /dev/ptmx must exist and be writable.
greg@fess 839$ ls -l /dev/ptmx
crw-rw-rw- 1 root tty 5, 2 Dec 1 17:28 /dev/ptmx
Use "mknod -m 666 /dev/ptmx c 5 2" to remedy.
2. The directory /dev/pts must exist
greg@fess 840$ ls -ld /dev/pts
drwxr-xr-x 2 root root 0 Nov 13 09:11 /dev/pts/
Use "mkdir /dev/pts; chmod 755 /dev/pts" to remedy
3. The filesystem type "devpts" must be supported in the kernel
greg@fess 841$ cat /proc/filesystems | grep pts
nodev devpts
Reconfigure and rebuild your kernel to remedy this.
4. The filesystem /dev/pts of type devpts must be mounted
greg@fess 842$ cat /proc/mounts | grep pts
devpts /dev/pts devpts rw 0 0
Short term remedy: "mount -t devpts devpts /dev/pts"
Long term remedy: put this into a startup script or add it to your /etc/fstab file.
There is plenty of info on the web to help you with any phase of this, depending on where you're falling short. One common failure mode seems to be this one:
******************
I've had some problems that stem from compiling a kernel (2.2.10) and not getting devpts included. I've searched throughout the kernel and haven't found this as an option, but when I compile and then boot from the new kernel, I get error messages on bootup that it has no support for filesystem devpts when mounting my disk's partitions.
Pts is a method of defining and accessing terminals. It has been included in newer version of Linux to work toward Unix98 branding.
Pts inclusion in the kernel is under 'Character Devices.' The help for that option recommends also adding the '/dev/pts filesystem for Unix98 PTYs' under 'Filesystems.' It sounds as if you've not done this latter step.
******************