LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   basic commands (https://www.linuxquestions.org/questions/linux-newbie-8/basic-commands-618895/)

siawash 02-05-2008 01:54 PM

basic commands
 
Hi, I need a quick answer and hope no one minds providing this to my doing some serious reading...

What is the the Linux equivalent to device manager to get a listing of all attached devices...Is there such a thing? Or do devices get listed in different directories according to their types. I.e. usb, ide, pci etc...

I would also be grateful for some networking commands such as linux's version of

ipconfig
netstat
netsh

The only network command that works with linux and windoz is ping.

Many thanks in advance

onebuck 02-05-2008 01:57 PM

Hi,

Not to be smart but you could search LQ or google and find that this has been asked numerous times.

You will find several references in my sig below.

Poetics 02-05-2008 01:59 PM

How about lsusb (USB), lspci (PCI), and mount (IDE/SATA/Serial)?

I did a search here at LQ.org for "ipconfig" and found literally hundreds of threads all describing the linux equivalent -- ifconfig

Take a look around this site; there are plenty of resources available.

weisso5 02-05-2008 02:04 PM

for easy device info:

dmesg | grep whateveryouarelookingfor

also if you just plug a USB device into your machine and hit dmesg it will show you which device it will associate with:

(Just examples)
/dev/sdb1 2 3 4 etc for HD/Flash Drives
/dev/sg1 2 3 4 etc for Input Devices



Networking commands:

ipconfig -> ifconfig


man ifconfig will explain how to work with the command

netstat -> netstat :)



-weisso

pixellany 02-05-2008 02:19 PM

for hardware: lshw

for Linux applications: man -k <keyword>

siawash 02-05-2008 04:22 PM

That was great thank you all.

A question regarding the ifconfig command. I run only as root user and while it seems to give a lot more info than in windows I cannot see the gateway address.

Link encap:Ethernet HWaddr 00:10:A4:80:3C:7B
inet addr:192.168.0.2 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::210:a4ff:fe80:3c7b/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:46057 errors:0 dropped:0 overruns:0 frame:0
TX packets:45096 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:38308925 (36.5 MiB) TX bytes:3037352 (2.8 MiB)
Interrupt:11 Base address:0x1000

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:64 errors:0 dropped:0 overruns:0 frame:0
TX packets:64 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:4940 (4.8 KiB) TX bytes:4940 (4.8 KiB)

Regarding device manager, as suspected in Linux there deos't seem one specific locatiion where all device are listed. I.e. different location for different device types...?

bigrigdriver 02-05-2008 04:34 PM

Quote:

I run only as root user
I strongly urge you to get out of the habit of loging in as root. That's a very serious breach of security. When you log in as root, a careless command from you can trach the system. You also leave your system wide open to attack when connected to the internet.

Start loging in as normal user, and learn to use the su and sudo commands to gain temporary root authority to make configurations, install software, etc, where root authority is needed.

siawash 02-05-2008 04:43 PM

Thanks for that. But what about the earlier question? I.e. why i dont see the gateway address using ifconfig?

siawash 02-05-2008 05:03 PM

lshw command
 
Quote:

Originally Posted by pixellany (Post 3047089)
for hardware: lshw

for Linux applications: man -k <keyword>

this command seems to be disto specific. In my PC Linux it says "command not found"...

even as root user..

cmnorton 02-05-2008 05:06 PM

How about the route command?
 
That works on my distros.

onebuck 02-05-2008 05:57 PM

Hi,
Quote:

Originally Posted by siawash (Post 3047220)
Thanks for that. But what about the earlier question? I.e. why i dont see the gateway address using ifconfig?

To get the routing table; 'route -n'.

As I stated before my sig has several command line guides. The first to links are for ways to assist you in posting then the next two are good command and system guides.

onebuck 02-05-2008 06:00 PM

Hi,

Quote:

Originally Posted by siawash (Post 3047232)
this command seems to be disto specific. In my PC Linux it says "command not found"...

even as root user..

Not distribution specific. 'man man';

Quote:

excerpt from 'man man'
-k Equivalent to apropos.

'man' is your friend.

Slokunshialgo 02-05-2008 06:46 PM

Quote:

Originally Posted by bigrigdriver (Post 3047215)
I strongly urge you to get out of the habit of loging in as root. That's a very serious breach of security. When you log in as root, a careless command from you can trach the system. You also leave your system wide open to attack when connected to the internet.

Start loging in as normal user, and learn to use the su and sudo commands to gain temporary root authority to make configurations, install software, etc, where root authority is needed.

And to think, when I first started using Linux, Slackware specifically, I was always logged in as root! I never actually made a second account. However, it was on an old laptop that didn't have an ethernet adapter, and thus was standalone, so no problems from the internet, and I really didn't want to keep having to su all the time to mount a drive, shut down the machine, etc. That, and I was learning, and the best way to learn is to make mistakes! (Note: I never trashed the system as root, I got enough of a handle before I learned how to do rm -rf /)

When I got it installed on my desktop, however, I almost instantly stopped using root for everything, and started picking up some security practices.


All times are GMT -5. The time now is 04:55 AM.