Solaris / OpenSolarisThis forum is for the discussion of Solaris, OpenSolaris, OpenIndiana, and illumos.
General Sun, SunOS and Sparc related questions also go here. Any Solaris fork or distribution is welcome.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi all, I've been a slackware user for a few years, so the recent move to Solaris is quite interesting for me =). I've recently bought an Ultra 60, just installed Solaris 10 on it today.
I do have some issues i'm trying to resolve..
1) Package Management: I noticed Solaris uses 'pkgadd' to install packages. I found a nice repository at http://www.sunfreeware.com and i can just download the packages, gunzip, and
pkgadd -d mypackage. If there are other better ways, then do tell =)
Are there ways to
- View a list of the packages and their versions of what i have currently installed? (like pkgtool in slackware)
- upgrade/remove a package? eg: If i have Apache 2.0.53 installed, i would want to upgrade or remove it before installing 2.0.54. (similar to upgradepkg and removepkg in slack)
2) How the heck can i sort out my PATH properly? Its currently set to /usr/sbin:/usr/bin, I know it should be more than this.. wget works when adding /usr/local/bin as a path, make works when i add /usr/ccs/bin to the path, but is there anything more? And how do i make this permanent?
3) The default shell is /bin/sh, and i don't like it =/, i prefer bash.. Is there any way to make bash the default one? And is there anyway to set the bashrc file? /etc/profile looks different here.. (scary)
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789
Rep:
Quote:
- View a list of the packages and their versions of what i have currently installed? (like pkgtool in slackware)
pkginfo
prodreg
Quote:
- upgrade/remove a package? eg: If i have Apache 2.0.53 installed, i would want to upgrade or remove it before installing 2.0.54. (similar to upgradepkg and removepkg in slack)
pkgrm then pkgadd
You can also use the wrapper pkg-get that is handling version checking, update and dependancies.
See blastwave.org for details.
Quote:
2) How the heck can i sort out my PATH properly? Its currently set to /usr/sbin:/usr/bin,
Meaning you're logged as root, regular users' PATH is just /usr/bin by default.
Quote:
I know it should be more than this.. wget works when adding /usr/local/bin as a path
It shouldn't, /usr/local/bin is not an allowed directory for freewares under SVR4/Solaris standards.
wget is normally in /usr/sfw/bin.
Quote:
, make works when i add /usr/ccs/bin to the path, but is there anything more? And how do i make this permanent?
You can add directories to the default PATH in /etc/default/ if you want the setting to be global.
Here's my PATH:
/usr/bin:/usr/sfw/bin:/opt/csw/bin:/usr/ccs/bin:/usr/dt/bin:/usr/openwin/bin:/usr/openwin/demo:/usr/sbin:/usr/ucb:
Quote:
3) The default shell is /bin/sh, and i don't like it =/, i prefer bash.. Is there any way to make bash the default one? And is there anyway to set the bashrc file? /etc/profile looks different here.. (scary)
You can change user's shells (as root) by using the "passwd -e [userid]" command.
What scares you in /etc/profile ?
I wouldn't advice you to set root's shell as bash, create an alias account instead.
Also, beware not breaking /etc/profile with bash specific constructions as you may mess you system.
Originally posted by jlliagre pkginfo
prodreg
pkgrm then pkgadd
That works, thanks, and i'll give pkg-get a look soon
Quote:
Meaning you're logged as root, regular users' PATH is just /usr/bin by default.
It shouldn't, /usr/local/bin is not an allowed directory for freewares under SVR4/Solaris standards.
wget is normally in /usr/sfw/bin.
I found alot of the programs i was looking for in /usr/sfw/bin, thanks. Shall i avoid using packages from sunfreeware.com then? because it installs them to /usr/local/
Quote:
What scares you in /etc/profile ?
breaking it with bash specific constructions
I'm just put off with the fact with
- I can't press backspace to delete, it displays ^H. The delete button displays ^[[3~ (also up/down arrows)
- I can't use the tab button to complete my command name
- i can't display the current dir i'm in before the #
- i miss the good ol' colors =/
I mean i know how to sort these out in bash, but like you said, i don't want to break the /etc/profile.
EDIT:
=======
The default PATH, that's in /etc/default/login, right?
Thanks alot for your help.
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789
Rep:
Quote:
Shall i avoid using packages from sunfreeware.com then? because it installs them to /usr/local/
From "man filesystem":
/usr/local
Not part of the SVR4-based Solaris distribution. The
/usr directory is exclusively for software bundled
with the Solaris operating system. If needed for stor-
ing machine-local add-on software, create the direc-
tory /opt/local and make /usr/local a symbolic link to
/opt/local. The /opt directory or filesystem is for
storing add-on software to the system.
Quote:
I'm just put off with the fact with
- I can't press backspace to delete, it displays ^H. The delete button displays ^[[3~ (also up/down arrows)
??
in what context ?
I do not experience that while running bash under Solaris 10, backspace sends ^H, which is right, and delete sends ascii 127, which also the right code.
Quote:
- I can't use the tab button to complete my command name
Yep, that's a bash feature.
Quote:
- i can't display the current dir i'm in before the #
You can do that with ksh too.
Quote:
- i miss the good ol' colors =/
Colors have nothing to do with the shell, but with the terminal. I do have colors with sh, ksh and bash.
Quote:
The default PATH, that's in /etc/default/login, right?
yes. There's another for shell launched by "su" in /etc/default/su
Originally posted by jlliagre
From "man filesystem":
/usr/local
Not part of the SVR4-based Solaris distribution. The
/usr directory is exclusively for software bundled
with the Solaris operating system. If needed for stor-
ing machine-local add-on software, create the direc-
tory /opt/local and make /usr/local a symbolic link to
/opt/local. The /opt directory or filesystem is for
storing add-on software to the system.
Thank you for that,
Quote:
??
in what context ?
I do not experience that while running bash under Solaris 10, backspace sends ^H, which is right, and delete sends ascii 127, which also the right code.
When i open a terminal in Solaris, or even when i SSH from my laptop into the server, it starts with /bin/sh, and not bash shell. That's why i was asking if i can just automatically use bash instead, but nevermind, i don't mind typing 'bash' everytime i login.
Quote:
Colors have nothing to do with the shell, but with the terminal. I do have colors with sh, ksh and bash.
If i decide to create a .bashrc file for root, where would i stick it? in the / folder?
Quote:
yes. There's another for shell launched by "su" in /etc/default/su
I had to also do the same thing with SUPATH too. Thanks =)
I'm slowly getting there =) i appreciate all your help.
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789
Rep:
Quote:
When i open a terminal in Solaris, or even when i SSH from my laptop into the server, it starts with /bin/sh, and not bash shell.
This is not a property of the system, but an attribute of the user account you use (last field in /etc/passwd for that user).
Quote:
That's why i was asking if i can just automatically use bash instead, but nevermind, i don't mind typing 'bash' everytime i login.
As I told you already, feel free to set non root account's shell to whatever is wanted with the "passwd -e" command.
Leave root shell as is, and create an alternate root accout like this should you want it:
Code:
bashroot:x:0:1:Super-User with bash shell and a home directory:/export/home/root:/bin/bash
Then create its home dir and give it a password:
Code:
mkdir /export/home/root
pwconv
passwd bashroot
and you are set.
Quote:
If i decide to create a .bashrc file for root, where would i stick it? in the / folder?
That's correct, and somewhat controversial. My "bashroot" suggestion would overcome this.
However, I must say it is a bad habit to customize the root account, and use it as general purpose login name.
Better sticking to a non privileged user, and use only the root account (or better zsudo/RBAC) only for
tasks really needing it.
Sorry for the late reply, i was busy with my finals.
Thanks alot for the help, you've made my move into solaris even easier than what i anticipated in the beginning. I probably might have a fwe more questions now and then, but i'll do my research before asking first.. =)
As for the CLI, it turns out this was all happening because i was using Eterm on my laptop when ssh-ing into the server.
I'm becoming quite interested with pkg-get, but there are a few things that are worrying me about it..
- The FTP/HTTP sites its downloading the packages from, its downloading it form a folder called 5.8. Does that mean solaris os 5.8?
pkg-get doesn't seem to see the programs i already have installed.. I told it to install mysql4, and it went on to download and install openSSL, Perl and a few more packages..
Originally, i have
Perl 5.8.4 -> SUNWperl584core, but it installed perl > CSWperl
same with openSSL
I already have SUNWopensslr, and it installed CSWossl.
Is it normal? Can i trust it with the programs its installing to /opt/csw ? Shall i remove the SUNW ones ? or am i starting to mess up my system here?
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789
Rep:
Quote:
- The FTP/HTTP sites its downloading the packages from, its downloading it form a folder called 5.8. Does that mean solaris os 5.8?
It does. But nevermind, Solaris is maintaining, in fact guaranteeing, upward compatibility from version 7, 8, and 9 upward, so there's no risk with it.
Quote:
pkg-get doesn't seem to see the programs i already have installed.. I told it to install mysql4, and it went on to download and install openSSL, Perl and a few more packages..
Originally, i have
Perl 5.8.4 -> SUNWperl584core, but it installed perl > CSWperl
same with openSSL
I already have SUNWopensslr, and it installed CSWossl.
Is it normal?
It is probably subject to discussion, but is the way blastwave maintainers have designed their project. http://www.blastwave.org/standards/layout.php
They try to avoid version conflicts by building an isolated "freeware ecosystem" under /opt/csw and ignoring other freewares that may have been installed elsewhere.
One other side effect of this way of doing is that /opt/csw can be NFS shared easily.
Quote:
Can i trust it with the programs its installing to /opt/csw ?
As much as you trust other open source projects.
Quote:
Shall i remove the SUNW ones ?
You're free to do so, but need not if your are not disk space constrained.
Hmm, i;m probably going to end up doing a minimal installation of Solaris. Installing Gaim wants me to also install some 30 programs, and i from what i see pkg-get provides more up to date software, and looks good enough to use for all my apps.
Hi all,
I am new to SunOS and my version is SunOS 5.8 Generic_117000-03 sun4u sparc SUNW,UltraAX-i2, but I'm used to Linux environment (RedHat) so I use the bash shell.
I'm trying to use tcpdump (no root access but permmision has been granted):
host# ls -l /opt/sfw/sbin/tcpdump
-rwxr-xr-x 1 root sys 401176 Nov 28 2001 /opt/sfw/sbin/tcpdump
but in my working directory when I type tcpdump:
bash-2.03$ tcpdump
bash: tcpdump: command not found
What I want to achieve is to add tcpdump's location to my PATH: /opt/sfw/sbin
also I do not have .bashrc file in my directory, do I create a new .bashrc file? cos I tried to add this path in .cshrc but did not work. what do I do so that when I do this:
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.