Difference between revisions of "Talk:PC-BSD® for Linux Users"

From PC-BSD Wiki
Jump to: navigation, search
(url for freebsd article, it is up to date)
(5 intermediate revisions by 2 users not shown)
Line 15: Line 15:
  
 
----
 
----
 +
 +
Other links to similar pages (added):
 +
 +
http://www.freebsd.org/doc/en/articles/explaining-bsd/comparing-bsd-and-linux.html
 +
 +
http://www.over-yonder.net/~fullermd/rants/bsd4linux/01
 +
 +
http://www.freebsd.org/doc/en/articles/linux-comparison/article.html
 +
 +
== lsdev vs. dmesg ==
 +
 +
I have been a full-time Linux user for five years. I have never heard of lsdev, and typing it at the command line (both as normal user and as root) on my Debian 6.0 system produces a command not found error, yet typing dmesg spits out the expected hardware-related kernel messages. I have always used dmesg regardless of distribution (some Debian based, some based on other distributions, some independent), and have never gotten a command not found error. Since I have not used any of the BSDs (I plan to when I can replace my dead hard disk), I cannot say if dmesg exists in PC-BSD, so I do not feel comfortable editing the table. [[User:Piki|Piki]] 15:23, 22 January 2012 (PST)
 +
----
 +
A storage place for this info which has vastly changed.
 +
=== Commands ===
 +
 +
If you're comfortable with the command line, you may find that some of the commands that you are used to have different names on BSD. Table 1.4c lists some common commands and their equivalents.
 +
 +
'''Table 1.4c: Common BSD and Linux Commands'''
 +
 +
{{Tbl-init|width=100%}}
 +
{{Tbl-title|width=25%|'''PC-BSD'''}}
 +
{{Tbl-title|width=25%|'''Linux'''}}
 +
{{Tbl-title|width=50%|'''Result'''}}
 +
|-
 +
<!-- row 1 -->
 +
{{Tbl-line|bg=ff|align=left|'''dmesg'''}}
 +
{{Tbl-line|bg=ff|align=left|'''dmesg'''<br>'''lsdev''' (Is this used anywhere?)}}
 +
{{Tbl-line|bg=ff|align=left|discover what hardware was detected by the kernel}}
 +
|-
 +
<!-- row 2 -->
 +
{{Tbl-line|align=left|'''sysctl dev}}
 +
{{Tbl-line|align=left|'''cat /proc/devices}}
 +
{{Tbl-line|align=left|display configured devices}}
 +
|-
 +
<!-- row 3 -->
 +
{{Tbl-line|bg=ff|align=left|'''pciconf -l -cv}}
 +
{{Tbl-line|bg=ff|align=left|'''lspci -tv}}
 +
{{Tbl-line|bg=ff|align=left|show PCI devices}}
 +
|-
 +
<!-- row 4 -->
 +
{{Tbl-line|align=left|'''dmesg <nowiki>|</nowiki> grep usb}}
 +
{{Tbl-line|align=left|'''lsusb -tv}}
 +
{{Tbl-line|align=left|show USB devices}}
 +
|-
 +
<!-- row 5 -->
 +
{{Tbl-line|bg=ff|align=left|'''kldstat}}
 +
{{Tbl-line|bg=ff|align=left|'''lsmod}}
 +
{{Tbl-line|bg=ff|align=left|list all modules loaded in the kernel}}
 +
|-
 +
<!-- row 6 -->
 +
 +
{{Tbl-line|align=left|'''kldload <module>}}
 +
{{Tbl-line|align=left|'''modprobe <module>}}
 +
{{Tbl-line|align=left|load a kernel module for the current session}}
 +
|-
 +
<!-- row 7 -->
 +
{{Tbl-line|bg=ff|align=left|'''pbi_add -r <pbiname>}}
 +
{{Tbl-line|bg=ff|align=left|'''rpm -i <package>.rpm}}
 +
{{Tbl-line|bg=ff|align=left|install software from the command line}}
 +
|-
 +
<!-- row 8 -->
 +
{{Tbl-line|align=left|'''sysctl hw.realmem}}
 +
{{Tbl-line|align=left|'''cat /proc/meminfo}}
 +
{{Tbl-line|align=left|hardware memory}}
 +
|-
 +
<!-- row 9 -->
 +
{{Tbl-line|bg=ff|align=left|'''sysctl hw.model}}
 +
{{Tbl-line|bg=ff|align=left|'''cat /proc/cpuinfo}}
 +
{{Tbl-line|bg=ff|align=left|CPU model}}
 +
|-
 +
<!-- row 10 -->
 +
{{Tbl-line|align=left|'''sysctl hw.machine_arch}}
 +
{{Tbl-line|align=left|'''uname -m}}
 +
{{Tbl-line|align=left|CPU Architecture}}
 +
|-
 +
<!-- row 11 -->
 +
{{Tbl-line|bg=ff|align=left|'''sysctl hw.ncpu}}
 +
{{Tbl-line|bg=ff|align=left|'''getconf _NPROCESSORS_ONLN}}
 +
{{Tbl-line|bg=ff|align=left|number of CPUs}}
 +
|-
 +
<!-- row 12 -->
 +
{{Tbl-line|align=left|'''uname -vm}}
 +
{{Tbl-line|align=left|'''lsb_release -a<br>cat /etc/*release<br>cat /etc/*version}}
 +
{{Tbl-line|align=left|get release version information}}
 +
|-
 +
<!-- row 13 -->
 +
{{Tbl-line|bg=ff|align=left|'''gpart show}}
 +
{{Tbl-line|bg=ff|align=left|'''fdisk -l<br>parted -l}}
 +
{{Tbl-line|bg=ff|align=left|show device partition information}}
 +
|-
 +
<!-- row 14 -->
 +
{{Tbl-line|align=left|'''fuser}}
 +
{{Tbl-line|align=left|'''lsof}}
 +
{{Tbl-line|align=left|list IDs of all processes that have one or more files open}}
 +
|-
 +
|}

Revision as of 05:23, 23 August 2012

Found a source for some info to include in this section: Unix Toolbox

Started with more necessary/common commands that have nearly identical results, but are invoked differently.

--Tigersharke 05:08, 24 June 2011 (PDT)


Since tigersharke asked, here is the link to the freebsd article for linux users to migrate http://www.freebsd.org/doc/en_US.ISO8859-1/articles/linux-users/index.html

it's at anyone's discretion how that URL will be used in this wiki page. so use it wisely. --"What may be obvious to you, may not be obvious to others. That's why we have to write about them." 23:12, 17 July 2011 (PDT)


Other links to similar pages (added):

http://www.freebsd.org/doc/en/articles/explaining-bsd/comparing-bsd-and-linux.html

http://www.over-yonder.net/~fullermd/rants/bsd4linux/01

http://www.freebsd.org/doc/en/articles/linux-comparison/article.html

lsdev vs. dmesg

I have been a full-time Linux user for five years. I have never heard of lsdev, and typing it at the command line (both as normal user and as root) on my Debian 6.0 system produces a command not found error, yet typing dmesg spits out the expected hardware-related kernel messages. I have always used dmesg regardless of distribution (some Debian based, some based on other distributions, some independent), and have never gotten a command not found error. Since I have not used any of the BSDs (I plan to when I can replace my dead hard disk), I cannot say if dmesg exists in PC-BSD, so I do not feel comfortable editing the table. Piki 15:23, 22 January 2012 (PST)


A storage place for this info which has vastly changed.

Commands

If you're comfortable with the command line, you may find that some of the commands that you are used to have different names on BSD. Table 1.4c lists some common commands and their equivalents.

Table 1.4c: Common BSD and Linux Commands

PC-BSD Linux Result
dmesg dmesg
lsdev (Is this used anywhere?)
discover what hardware was detected by the kernel
sysctl dev cat /proc/devices display configured devices
pciconf -l -cv lspci -tv show PCI devices
dmesg | grep usb lsusb -tv show USB devices
kldstat lsmod list all modules loaded in the kernel
kldload <module> modprobe <module> load a kernel module for the current session
pbi_add -r <pbiname> rpm -i <package>.rpm install software from the command line
sysctl hw.realmem cat /proc/meminfo hardware memory
sysctl hw.model cat /proc/cpuinfo CPU model
sysctl hw.machine_arch uname -m CPU Architecture
sysctl hw.ncpu getconf _NPROCESSORS_ONLN number of CPUs
uname -vm lsb_release -a
cat /etc/*release
cat /etc/*version
get release version information
gpart show fdisk -l
parted -l
show device partition information
fuser lsof list IDs of all processes that have one or more files open