Title: How do i send data from one raspberry pi to another using a LAN cable?
Tags: wifi;pi-4;data-transfer
Question: If I have 2 raspberry pi's and I wanted to transfer\receive data with a LAN cable connected to them both(do i need a crossover cable?) how would I get the data from the LAN port? with a python script or bash file? how could i send and receive data from the command line?
Comment: not a Raspberry Pi question ... it is a Linux networking question .... what exactly is the data you are talking about?

Comment: @jsotola, uh just text/string data. temperature/humidity and probably some other stuff. that and added maybe a chat window so you could "text" the other rpi

Comment: The problem with your question is that there are an almost innumerable number of ways to do this. One way would be to [use `Link Local` addresses](https://duckduckgo.com/?q=using+link+local+addresses+linux), and there is [another Q&A here on RPi SE](https://raspberrypi.stackexchange.com/questions/37554/local-network-between-two-rpis) that answers your question using another approach.


Here is another answer: You could just connect both of them to one another with a normal internet cable, and give them both a static IP. You could also just connect them to your network. Would probably be easier. I don't know if that is possible in your current setup though.
If they have the same default gateway (and subnet mask), and you give them an IP in between your chosen subnet mask, you should be able to just SSH or SFTP from one Pi to another.
But like @Jsotola stated, it is not really a RPi specific question.
Comment for this answer: Where should I ask this
Comment for this answer: I gave you a suggestion to try/Google more info on. And you could try the Unix StackExchange, with a network tag for example (unix.stackexchange.com/). You should also find enough tutorials in general about this subject. Try to Google: `connect two raspberry pi with ethernet cable` or something alike

{'source': 'StackExchangeDataset', 'subset': 'raspberrypi.stackexchange.com', 'metadata': {'AnswerCount': 1, 'CommentCount': 3, 'ContentLicense': 'CC BY-SA 4.0', 'CreationDate': '2022:00:03/29/22', 'FavoriteCount': None, 'PostTypeId': 1, 'Tags': '<wifi><pi-4><data-transfer>', 'Title': 'How do i send data from one raspberry pi to another using a LAN cable?', 'ViewCount': 208, 'id': 136800, 'user_AboutMe': None, 'user_AccountId': 18641246.0, 'user_DisplayName': 'The_ SCP_Master', 'user_Reputation': 7.0, 'user_Views': 2.0, 'user_id': 120007.0}}