Difference between revisions of "Useful Commands"
From GhostBSD Wiki
m (→Selected helpful Commands) |
|||
(45 intermediate revisions by one other user not shown) | |||
Line 9: | Line 9: | ||
==Common Commands== | ==Common Commands== | ||
+ | |||
+ | ===Basic Commands on Your system=== | ||
+ | |||
+ | See also in In your directories | ||
+ | * [[/usr/bin/]] [[/usr/sbin/]] useful applications for your cli, | ||
+ | * [[/bin/]] and [[/sbin/]] system tools. | ||
===For People New to Both Ghost/FreeBSD and UNIX=== | ===For People New to Both Ghost/FreeBSD and UNIX=== | ||
Line 14: | Line 20: | ||
[https://www.freebsd.org/doc/en_US.ISO8859-1/articles/new-users/index.html from Annelise Anderson] | [https://www.freebsd.org/doc/en_US.ISO8859-1/articles/new-users/index.html from Annelise Anderson] | ||
− | ===Linux and BSD=== | + | ===Short Comparison Linux and BSD=== |
[https://www.freebsd.org/doc/en_US.ISO8859-1/articles/linux-users/commands.html Common Commands] | [https://www.freebsd.org/doc/en_US.ISO8859-1/articles/linux-users/commands.html Common Commands] | ||
+ | |||
+ | ===UNIX Command Summary=== | ||
+ | |||
+ | [https://www.bsd.org/unixcmds.html on BSD.org] | ||
+ | |||
+ | |||
+ | ===An introduction to Regular Expressions=== | ||
+ | |||
+ | [https://www.bsd.org/regexintro.html on BSD.org] | ||
+ | |||
+ | ===A concise reference of vi commands=== | ||
+ | |||
+ | [https://www.bsd.org/viref.html on BSD.org] | ||
===FreeBSD Command Reference=== | ===FreeBSD Command Reference=== | ||
Line 30: | Line 49: | ||
[https://www.cyberciti.biz/tips/freebsd-display-information-about-the-system.html nixCraft] | [https://www.cyberciti.biz/tips/freebsd-display-information-about-the-system.html nixCraft] | ||
+ | |||
+ | |||
+ | |||
+ | ===FREEBSD Man Pages === | ||
+ | |||
+ | This page gives an overview about all commands and there man pages (12,652 Total Pages): | ||
+ | [https://www.unix.com/man-page-collection.php?os=freebsd The UNIX and Linux Forums] | ||
+ | |||
+ | ==Selected helpful Commands== | ||
+ | |||
+ | {|class="wikitable" style="width:96.5%;background:#FFFFFF; border:2px solid #008000;text-align:left;padding: 10px" | ||
+ | |- | ||
+ | ! scope="col" style="width: 200px;"|'''Command''' | ||
+ | ! scope="col" style="width: 350px;"|'''Abstract''' | ||
+ | ! scope="col" style="width: 150px;"|'''Addition or Link''' | ||
+ | |- | ||
+ | |sudo [https://www.freebsd.org/cgi/man.cgi?query=pkg-info&sektion=8&apropos=0&manpath=FreeBSD+12.1-RELEASE+and+Ports pkg info] os-generic-userland <nowiki>|</nowiki> grep Version | ||
+ | |Shows what version of GhostBSD I am running | ||
+ | |[https://forums.ghostbsd.org/viewtopic.php?f=61&p=8353#p8353 ericbsd on the forum] | ||
+ | |- | ||
+ | |neofetch||shows your installed version with a beastie logo <br/>Fast, highly customizable system info script. This script gathers info about your system and prints it to the | ||
+ | terminal next to an image, your distro's logo or any ascii art of | ||
+ | your choice! | ||
+ | ||https://github.com/dylanaraps/neofetch | ||
+ | |- | ||
+ | |[[sysctl]] kern.osreldate | ||
+ | |Shows the same result as uname -U | ||
+ | |[https://www.freebsd.org/cgi/man.cgi?query=sysctl&sektion=8&apropos=0&manpath=FreeBSD+12.1-RELEASE+and+Ports sysctl(8)] | ||
+ | |- | ||
+ | |[https://www.freebsd.org/cgi/man.cgi?query=uname&apropos=0&sektion=0&manpath=FreeBSD+12.1-RELEASE+and+Ports&arch=default&format=html uname] -U | ||
+ | |you get: 1201500 or higher; part 1201 comes from FreeBSD-version 12.01 and 500 seems to bee the level of contribs. | ||
+ | |see also [https://forums.ghostbsd.org/viewtopic.php?f=91&t=1556 ericbsd]; [https://www.cyberciti.biz/faq/how-to-find-out-freebsd-version-and-patch-level-number/ nixCraft Linux and Unix tutorials for new and seasoned sysadmin] | ||
+ | |- | ||
+ | |[[OpenRC]] | ||
+ | |command scripts for auto-reboot and daemon startup | ||
+ | Files | ||
+ | /etc/[[Rc|rc]] | ||
+ | /etc/[[rc.conf]] | ||
+ | /etc/rc.conf.local | ||
+ | /etc/[[rc.d]]/ | ||
+ | /etc/rc.firewall | ||
+ | /etc/rc.local | ||
+ | /etc/rc.shutdown | ||
+ | /etc/rc.subr | ||
+ | /var/run/dmesg.boot | ||
+ | |[[File:Jean victor balin book.png|25px|link=https://www.freebsd.org/cgi/man.cgi?query=rc&apropos=0&sektion=8&manpath=FreeBSD+12.1-RELEASE+and+Ports&arch=default&format=html]] | ||
+ | |- | ||
+ | |[[dmesg]] | ||
+ | |Discover what hardware was detected by the kernel and other system related information. | ||
+ | |[[File:Jean victor balin book.png|25px|link=https://www.unix.com/man-page/freebsd/8/dmesg/]] | ||
+ | |- | ||
+ | |dmesg <nowiki>|</nowiki> grep usb | ||
+ | |Show USB devices. | ||
+ | | | ||
+ | |- | ||
+ | |[[kldstat]] | ||
+ | |List all modules currently loaded in the kernel. | ||
+ | | | ||
+ | |- | ||
+ | |gpart | ||
+ | |The gpart utility is used to partition GEOM providers, normally disks | ||
+ | |[[File:Jean victor balin book.png|25px|link=https://www.unix.com/man-page/freebsd/8/gpart/]] | ||
+ | |- | ||
+ | |mount -t msdosfs /dev/da5s1 /mnt | ||
+ | |mount USB stick, the numbers 5 and 1 are exables, you have to get them with gpart for your system | ||
+ | |[[File:Jean victor balin book.png|25px|link=https://www.unix.com/man-page/freebsd/5/msdosfs/]] | ||
+ | |- | ||
+ | |ntfs-3g /dev/da'''x'''s'''y''' /mnt | ||
+ | |mount NTFS device | ||
+ | | | ||
+ | |- | ||
+ | |pciconf -lv | ||
+ | |Output to identify your video card | ||
+ | |Fred Finster 10.01.2020 on Telegram, see also [[File:Jean victor balin book.png|25px|link=https://www.unix.com/man-page/freebsd/8/pciconf/]] | ||
+ | |- | ||
+ | |pciconf -l -cv | ||
+ | |Show PCI devices. | ||
+ | |[[File:Jean victor balin book.png|25px|link=https://www.unix.com/man-page/freebsd/8/pciconf/]] | ||
+ | |- | ||
+ | |scanimage -L | ||
+ | |Shows if the scanner is connected and seen | ||
+ | |[[File:Icon FreeBSD.png|100px|link=https://www.bsdforen.de/threads/scanner-device-in-qt5-variable-einlesen.33977/]] [[File:1329059652.png|35px|link=http://www.sane-project.org/man/scanimage.1.html]] | ||
+ | |- | ||
+ | |[[sysctl]] hw.realmem | ||
+ | |Display hardware memory. | ||
+ | |[[File:Jean victor balin book.png|25px|link=https://www.unix.com/man-page/freebsd/8/sysctl/]] | ||
+ | |- | ||
+ | |[[sysctl]] dev <nowiki>|</nowiki> less | ||
+ | |Display configured devices. | ||
+ | | | ||
+ | |- | ||
+ | |[[sysctl]] hw.model | ||
+ | |Display CPU model. | ||
+ | |[[File:Jean victor balin book.png|25px|link=https://www.unix.com/man-page/freebsd/8/sysctl/]] | ||
+ | |- | ||
+ | |[[sysctl]] hw.machine_arch | ||
+ | |Display CPU Architecture | ||
+ | |[[File:Jean victor balin book.png|25px|link=https://www.unix.com/man-page/freebsd/8/sysctl/]] | ||
+ | |- | ||
+ | |[[sysctl]] hw.ncpu | ||
+ | |Display number of CPUs. | ||
+ | |[[File:Jean victor balin book.png|25px|link=https://www.unix.com/man-page/freebsd/8/sysctl/]] | ||
+ | |- | ||
+ | |uname -vm | ||
+ | |Get release version information. | ||
+ | |[[File:Jean victor balin book.png|25px|link=https://www.unix.com/man-page/freebsd/1/uname/]] | ||
+ | |- | ||
+ | |uname -a | ||
+ | |Get release version and user.pc information | ||
+ | |[[File:Jean victor balin book.png|25px|link=https://www.unix.com/man-page/freebsd/1/uname/]] | ||
+ | |- | ||
+ | |freebsd-version | ||
+ | |print the version and patch level of the installed base system: FreeBSD, Info is located <code>/bin/freebsd-version</code> on your system | ||
+ | |[[File:Jean victor balin book.png|25px|link=https://www.unix.com/man-page/freebsd/1/freebsd-version/]] | ||
+ | |- | ||
+ | !colspan="3"| | ||
+ | |- | ||
+ | !colspan="3"|'''Back to the''' [[image:Icon Disti GhostBSD.png|50px|link=GhostBSD Wiki]]''' Wiki''' | ||
+ | |} | ||
+ | |||
+ | |||
+ | [[Category:Sysutils]] |
Latest revision as of 02:44, 27 February 2021
Welcome to the Useful Commands |
Contents
- 1 Introduction
- 2 Common Commands
- 2.1 Basic Commands on Your system
- 2.2 For People New to Both Ghost/FreeBSD and UNIX
- 2.3 Short Comparison Linux and BSD
- 2.4 UNIX Command Summary
- 2.5 An introduction to Regular Expressions
- 2.6 A concise reference of vi commands
- 2.7 FreeBSD Command Reference
- 2.8 Useful Overview
- 2.9 FreeBSD Display Information About The System Hardware
- 2.10 FREEBSD Man Pages
- 3 Selected helpful Commands
Introduction[edit]
There are a lot of useful commands for GhostBSD. Most of them are written for FreeBSD and you can find them easy. They work also for GhostBSD. But some are hidden in the deep web. You get them from hints in different forums or on Telegram. The first we will connect to this page and the last we will collect on this page.
Common Commands[edit]
Basic Commands on Your system[edit]
See also in In your directories
- /usr/bin/ /usr/sbin/ useful applications for your cli,
- /bin/ and /sbin/ system tools.
For People New to Both Ghost/FreeBSD and UNIX[edit]
Short Comparison Linux and BSD[edit]
UNIX Command Summary[edit]
An introduction to Regular Expressions[edit]
A concise reference of vi commands[edit]
FreeBSD Command Reference[edit]
AfNOG If this list is up to date we have to check.
Useful Overview[edit]
FreeBSD Display Information About The System Hardware[edit]
FREEBSD Man Pages[edit]
This page gives an overview about all commands and there man pages (12,652 Total Pages): The UNIX and Linux Forums
Selected helpful Commands[edit]
Command | Abstract | Addition or Link |
---|---|---|
sudo pkg info os-generic-userland | grep Version | Shows what version of GhostBSD I am running | ericbsd on the forum |
neofetch | shows your installed version with a beastie logo Fast, highly customizable system info script. This script gathers info about your system and prints it to the terminal next to an image, your distro's logo or any ascii art of your choice! |
https://github.com/dylanaraps/neofetch |
sysctl kern.osreldate | Shows the same result as uname -U | sysctl(8) |
uname -U | you get: 1201500 or higher; part 1201 comes from FreeBSD-version 12.01 and 500 seems to bee the level of contribs. | see also ericbsd; nixCraft Linux and Unix tutorials for new and seasoned sysadmin |
OpenRC | command scripts for auto-reboot and daemon startup
Files /etc/rc /etc/rc.conf /etc/rc.conf.local /etc/rc.d/ /etc/rc.firewall /etc/rc.local /etc/rc.shutdown /etc/rc.subr /var/run/dmesg.boot |
|
dmesg | Discover what hardware was detected by the kernel and other system related information. | |
dmesg | grep usb | Show USB devices. | |
kldstat | List all modules currently loaded in the kernel. | |
gpart | The gpart utility is used to partition GEOM providers, normally disks | |
mount -t msdosfs /dev/da5s1 /mnt | mount USB stick, the numbers 5 and 1 are exables, you have to get them with gpart for your system | |
ntfs-3g /dev/daxsy /mnt | mount NTFS device | |
pciconf -lv | Output to identify your video card | Fred Finster 10.01.2020 on Telegram, see also |
pciconf -l -cv | Show PCI devices. | |
scanimage -L | Shows if the scanner is connected and seen | |
sysctl hw.realmem | Display hardware memory. | |
sysctl dev | less | Display configured devices. | |
sysctl hw.model | Display CPU model. | |
sysctl hw.machine_arch | Display CPU Architecture | |
sysctl hw.ncpu | Display number of CPUs. | |
uname -vm | Get release version information. | |
uname -a | Get release version and user.pc information | |
freebsd-version | print the version and patch level of the installed base system: FreeBSD, Info is located /bin/freebsd-version on your system
|
|
Back to the Wiki |